diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h new file mode 100644 index 00000000000000..d0b5891630b4c2 --- /dev/null +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -0,0 +1,764 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#import + +@class CHIPDevice; + +NS_ASSUME_NONNULL_BEGIN + +/** + * Cluster Account Login + * + */ +@interface CHIPTestAccountLogin : CHIPAccountLogin + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster AdministratorCommissioning + * + */ +@interface CHIPTestAdministratorCommissioning : CHIPAdministratorCommissioning + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Application Basic + * + */ +@interface CHIPTestApplicationBasic : CHIPApplicationBasic + +- (void)writeAttributeVendorNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeVendorIdWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeApplicationNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeProductIdWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeApplicationIdWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCatalogVendorIdWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeApplicationStatusWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Application Launcher + * + */ +@interface CHIPTestApplicationLauncher : CHIPApplicationLauncher + +- (void)writeAttributeCatalogVendorIdWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeApplicationIdWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Audio Output + * + */ +@interface CHIPTestAudioOutput : CHIPAudioOutput + +- (void)writeAttributeCurrentAudioOutputWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Barrier Control + * + */ +@interface CHIPTestBarrierControl : CHIPBarrierControl + +- (void)writeAttributeBarrierMovingStateWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeBarrierSafetyStatusWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeBarrierCapabilitiesWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeBarrierPositionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Basic + * + */ +@interface CHIPTestBasic : CHIPBasic + +- (void)writeAttributeInteractionModelVersionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeVendorNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeVendorIDWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeProductNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeProductIDWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeHardwareVersionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeHardwareVersionStringWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeSoftwareVersionWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeSoftwareVersionStringWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeManufacturingDateWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePartNumberWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeProductURLWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeProductLabelWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeSerialNumberWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeReachableWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Binary Input (Basic) + * + */ +@interface CHIPTestBinaryInputBasic : CHIPBinaryInputBasic + +- (void)writeAttributeStatusFlagsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Binding + * + */ +@interface CHIPTestBinding : CHIPBinding + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Bridged Device Basic + * + */ +@interface CHIPTestBridgedDeviceBasic : CHIPBridgedDeviceBasic + +- (void)writeAttributeVendorNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeVendorIDWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeProductNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeHardwareVersionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeHardwareVersionStringWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeSoftwareVersionWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeSoftwareVersionStringWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeManufacturingDateWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePartNumberWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeProductURLWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeProductLabelWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeSerialNumberWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeReachableWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Color Control + * + */ +@interface CHIPTestColorControl : CHIPColorControl + +- (void)writeAttributeCurrentHueWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentSaturationWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRemainingTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentXWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentYWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeDriftCompensationWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCompensationTextWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeColorTemperatureWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeColorModeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNumberOfPrimariesWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary1XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary1YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary1IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary2XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary2YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary2IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary3XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary3YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary3IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary4XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary4YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary4IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary5XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary5YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary5IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary6XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary6YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePrimary6IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeEnhancedCurrentHueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeEnhancedColorModeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeColorLoopActiveWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeColorLoopDirectionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeColorLoopTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeColorLoopStartEnhancedHueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeColorLoopStoredEnhancedHueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeColorCapabilitiesWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeColorTempPhysicalMinWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeColorTempPhysicalMaxWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCoupleColorTempToLevelMinMiredsWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Content Launcher + * + */ +@interface CHIPTestContentLauncher : CHIPContentLauncher + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Descriptor + * + */ +@interface CHIPTestDescriptor : CHIPDescriptor + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Diagnostic Logs + * + */ +@interface CHIPTestDiagnosticLogs : CHIPDiagnosticLogs + +@end + +/** + * Cluster Door Lock + * + */ +@interface CHIPTestDoorLock : CHIPDoorLock + +- (void)writeAttributeLockStateWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeLockTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeActuatorEnabledWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Electrical Measurement + * + */ +@interface CHIPTestElectricalMeasurement : CHIPElectricalMeasurement + +- (void)writeAttributeMeasurementTypeWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTotalActivePowerWithValue:(int32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRmsVoltageWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRmsVoltageMinWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRmsVoltageMaxWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRmsCurrentWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRmsCurrentMinWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRmsCurrentMaxWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeActivePowerWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeActivePowerMinWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeActivePowerMaxWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Ethernet Network Diagnostics + * + */ +@interface CHIPTestEthernetNetworkDiagnostics : CHIPEthernetNetworkDiagnostics + +- (void)writeAttributePacketRxCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePacketTxCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxErrCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCollisionCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeOverrunCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Fixed Label + * + */ +@interface CHIPTestFixedLabel : CHIPFixedLabel + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Flow Measurement + * + */ +@interface CHIPTestFlowMeasurement : CHIPFlowMeasurement + +- (void)writeAttributeMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMinMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMaxMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster General Commissioning + * + */ +@interface CHIPTestGeneralCommissioning : CHIPGeneralCommissioning + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster General Diagnostics + * + */ +@interface CHIPTestGeneralDiagnostics : CHIPGeneralDiagnostics + +- (void)writeAttributeRebootCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Group Key Management + * + */ +@interface CHIPTestGroupKeyManagement : CHIPGroupKeyManagement + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Groups + * + */ +@interface CHIPTestGroups : CHIPGroups + +- (void)writeAttributeNameSupportWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Identify + * + */ +@interface CHIPTestIdentify : CHIPIdentify + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Keypad Input + * + */ +@interface CHIPTestKeypadInput : CHIPKeypadInput + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Level Control + * + */ +@interface CHIPTestLevelControl : CHIPLevelControl + +- (void)writeAttributeCurrentLevelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Low Power + * + */ +@interface CHIPTestLowPower : CHIPLowPower + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Media Input + * + */ +@interface CHIPTestMediaInput : CHIPMediaInput + +- (void)writeAttributeCurrentMediaInputWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Media Playback + * + */ +@interface CHIPTestMediaPlayback : CHIPMediaPlayback + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Network Commissioning + * + */ +@interface CHIPTestNetworkCommissioning : CHIPNetworkCommissioning + +- (void)writeAttributeFeatureMapWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster OTA Software Update Provider + * + */ +@interface CHIPTestOtaSoftwareUpdateProvider : CHIPOtaSoftwareUpdateProvider + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Occupancy Sensing + * + */ +@interface CHIPTestOccupancySensing : CHIPOccupancySensing + +- (void)writeAttributeOccupancyWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeOccupancySensorTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeOccupancySensorTypeBitmapWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster On/Off + * + */ +@interface CHIPTestOnOff : CHIPOnOff + +- (void)writeAttributeOnOffWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeGlobalSceneControlWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeFeatureMapWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster On/off Switch Configuration + * + */ +@interface CHIPTestOnOffSwitchConfiguration : CHIPOnOffSwitchConfiguration + +- (void)writeAttributeSwitchTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Operational Credentials + * + */ +@interface CHIPTestOperationalCredentials : CHIPOperationalCredentials + +- (void)writeAttributeSupportedFabricsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCommissionedFabricsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Pressure Measurement + * + */ +@interface CHIPTestPressureMeasurement : CHIPPressureMeasurement + +- (void)writeAttributeMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMinMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMaxMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Pump Configuration and Control + * + */ +@interface CHIPTestPumpConfigurationAndControl : CHIPPumpConfigurationAndControl + +- (void)writeAttributeMaxPressureWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMaxSpeedWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMaxFlowWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeEffectiveOperationModeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeEffectiveControlModeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCapacityWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Relative Humidity Measurement + * + */ +@interface CHIPTestRelativeHumidityMeasurement : CHIPRelativeHumidityMeasurement + +- (void)writeAttributeMeasuredValueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMinMeasuredValueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMaxMeasuredValueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Scenes + * + */ +@interface CHIPTestScenes : CHIPScenes + +- (void)writeAttributeSceneCountWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentSceneWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentGroupWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeSceneValidWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNameSupportWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Software Diagnostics + * + */ +@interface CHIPTestSoftwareDiagnostics : CHIPSoftwareDiagnostics + +- (void)writeAttributeCurrentHeapHighWatermarkWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Switch + * + */ +@interface CHIPTestSwitch : CHIPSwitch + +- (void)writeAttributeNumberOfPositionsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentPositionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster TV Channel + * + */ +@interface CHIPTestTvChannel : CHIPTvChannel + +- (void)writeAttributeTvChannelLineupWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentTvChannelWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Target Navigator + * + */ +@interface CHIPTestTargetNavigator : CHIPTargetNavigator + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Temperature Measurement + * + */ +@interface CHIPTestTemperatureMeasurement : CHIPTemperatureMeasurement + +- (void)writeAttributeMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMinMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMaxMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Test Cluster + * + */ +@interface CHIPTestTestCluster : CHIPTestCluster + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Thermostat + * + */ +@interface CHIPTestThermostat : CHIPThermostat + +- (void)writeAttributeLocalTemperatureWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeAbsMinHeatSetpointLimitWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeAbsMaxHeatSetpointLimitWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeAbsMinCoolSetpointLimitWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeAbsMaxCoolSetpointLimitWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeStartOfWeekWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNumberOfWeeklyTransitionsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNumberOfDailyTransitionsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeFeatureMapWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Thermostat User Interface Configuration + * + */ +@interface CHIPTestThermostatUserInterfaceConfiguration : CHIPThermostatUserInterfaceConfiguration + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Thread Network Diagnostics + * + */ +@interface CHIPTestThreadNetworkDiagnostics : CHIPThreadNetworkDiagnostics + +- (void)writeAttributeChannelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRoutingRoleWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNetworkNameWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePanIdWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeExtendedPanIdWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMeshLocalPrefixWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeOverrunCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePartitionIdWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeWeightingWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeDataVersionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeStableDataVersionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeLeaderRouterIdWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeDetachedRoleCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeChildRoleCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRouterRoleCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeLeaderRoleCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeAttachAttemptCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributePartitionIdChangeCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeBetterPartitionAttachAttemptCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeParentChangeCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxTotalCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxUnicastCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxBroadcastCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxAckRequestedCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxAckedCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxNoAckRequestedCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxDataCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxDataPollCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxBeaconCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxBeaconRequestCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxOtherCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxRetryCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxDirectMaxRetryExpiryCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxIndirectMaxRetryExpiryCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxErrCcaCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxErrAbortCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTxErrBusyChannelCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxTotalCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxUnicastCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxBroadcastCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxDataCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxDataPollCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxBeaconCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxBeaconRequestCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxOtherCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxAddressFilteredCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxDestAddrFilteredCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxDuplicatedCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxErrNoFrameCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxErrUnknownNeighborCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxErrInvalidSrcAddrCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxErrSecCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxErrFcsCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRxErrOtherCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeChannelMaskWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Wake on LAN + * + */ +@interface CHIPTestWakeOnLan : CHIPWakeOnLan + +- (void)writeAttributeWakeOnLanMacAddressWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster WiFi Network Diagnostics + * + */ +@interface CHIPTestWiFiNetworkDiagnostics : CHIPWiFiNetworkDiagnostics + +- (void)writeAttributeBssidWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeSecurityTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeWiFiVersionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeChannelNumberWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRssiWithValue:(int8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +/** + * Cluster Window Covering + * + */ +@interface CHIPTestWindowCovering : CHIPWindowCovering + +- (void)writeAttributeTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentPositionLiftWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentPositionTiltWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeConfigStatusWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentPositionLiftPercentageWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentPositionTiltPercentageWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeOperationalStatusWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTargetPositionLiftPercent100thsWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeTargetPositionTiltPercent100thsWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeEndProductTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentPositionLiftPercent100thsWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentPositionTiltPercent100thsWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeInstalledOpenLimitLiftWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeInstalledClosedLimitLiftWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeInstalledOpenLimitTiltWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeInstalledClosedLimitTiltWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeSafetyStatusWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm new file mode 100644 index 00000000000000..585463618844cd --- /dev/null +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -0,0 +1,2652 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP +#import + +#import "CHIPCallbackBridge_internal.h" +#import "CHIPCluster_internal.h" +#import "CHIPDevice.h" +#import "CHIPDevice_Internal.h" + +#import "zap-generated/CHIPTestClustersObjc.h" +#import "zap-generated/tests/CHIPClusters.h" + +using chip::Callback::Cancelable; + +@interface CHIPTestAccountLogin () +@property (readonly) chip::Controller::AccountLoginClusterTest cppCluster; +@end + +@implementation CHIPTestAccountLogin + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestAdministratorCommissioning () +@property (readonly) chip::Controller::AdministratorCommissioningClusterTest cppCluster; +@end + +@implementation CHIPTestAdministratorCommissioning + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestApplicationBasic () +@property (readonly) chip::Controller::ApplicationBasicClusterTest cppCluster; +@end + +@implementation CHIPTestApplicationBasic + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeVendorNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeVendorName(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeVendorIdWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeVendorId(success, failure, value); + }); +} + +- (void)writeAttributeApplicationNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeApplicationName(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeProductIdWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeProductId(success, failure, value); + }); +} + +- (void)writeAttributeApplicationIdWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeApplicationId(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeCatalogVendorIdWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCatalogVendorId(success, failure, value); + }); +} + +- (void)writeAttributeApplicationStatusWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeApplicationStatus(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestApplicationLauncher () +@property (readonly) chip::Controller::ApplicationLauncherClusterTest cppCluster; +@end + +@implementation CHIPTestApplicationLauncher + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeCatalogVendorIdWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCatalogVendorId(success, failure, value); + }); +} + +- (void)writeAttributeApplicationIdWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeApplicationId(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestAudioOutput () +@property (readonly) chip::Controller::AudioOutputClusterTest cppCluster; +@end + +@implementation CHIPTestAudioOutput + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeCurrentAudioOutputWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentAudioOutput(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestBarrierControl () +@property (readonly) chip::Controller::BarrierControlClusterTest cppCluster; +@end + +@implementation CHIPTestBarrierControl + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeBarrierMovingStateWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeBarrierMovingState(success, failure, value); + }); +} + +- (void)writeAttributeBarrierSafetyStatusWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeBarrierSafetyStatus(success, failure, value); + }); +} + +- (void)writeAttributeBarrierCapabilitiesWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeBarrierCapabilities(success, failure, value); + }); +} + +- (void)writeAttributeBarrierPositionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeBarrierPosition(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestBasic () +@property (readonly) chip::Controller::BasicClusterTest cppCluster; +@end + +@implementation CHIPTestBasic + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeInteractionModelVersionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeInteractionModelVersion(success, failure, value); + }); +} + +- (void)writeAttributeVendorNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeVendorName(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeVendorIDWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeVendorID(success, failure, value); + }); +} + +- (void)writeAttributeProductNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeProductName(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeProductIDWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeProductID(success, failure, value); + }); +} + +- (void)writeAttributeHardwareVersionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeHardwareVersion(success, failure, value); + }); +} + +- (void)writeAttributeHardwareVersionStringWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeHardwareVersionString(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeSoftwareVersionWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSoftwareVersion(success, failure, value); + }); +} + +- (void)writeAttributeSoftwareVersionStringWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSoftwareVersionString(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeManufacturingDateWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeManufacturingDate(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributePartNumberWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePartNumber(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeProductURLWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeProductURL(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeProductLabelWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeProductLabel(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeSerialNumberWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSerialNumber(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeReachableWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeReachable(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestBinaryInputBasic () +@property (readonly) chip::Controller::BinaryInputBasicClusterTest cppCluster; +@end + +@implementation CHIPTestBinaryInputBasic + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeStatusFlagsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeStatusFlags(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestBinding () +@property (readonly) chip::Controller::BindingClusterTest cppCluster; +@end + +@implementation CHIPTestBinding + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestBridgedDeviceBasic () +@property (readonly) chip::Controller::BridgedDeviceBasicClusterTest cppCluster; +@end + +@implementation CHIPTestBridgedDeviceBasic + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeVendorNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeVendorName(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeVendorIDWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeVendorID(success, failure, value); + }); +} + +- (void)writeAttributeProductNameWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeProductName(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeHardwareVersionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeHardwareVersion(success, failure, value); + }); +} + +- (void)writeAttributeHardwareVersionStringWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeHardwareVersionString(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeSoftwareVersionWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSoftwareVersion(success, failure, value); + }); +} + +- (void)writeAttributeSoftwareVersionStringWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSoftwareVersionString(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeManufacturingDateWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeManufacturingDate(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributePartNumberWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePartNumber(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeProductURLWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeProductURL(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeProductLabelWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeProductLabel(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeSerialNumberWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSerialNumber(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeReachableWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeReachable(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestColorControl () +@property (readonly) chip::Controller::ColorControlClusterTest cppCluster; +@end + +@implementation CHIPTestColorControl + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeCurrentHueWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentHue(success, failure, value); + }); +} + +- (void)writeAttributeCurrentSaturationWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentSaturation(success, failure, value); + }); +} + +- (void)writeAttributeRemainingTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRemainingTime(success, failure, value); + }); +} + +- (void)writeAttributeCurrentXWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentX(success, failure, value); + }); +} + +- (void)writeAttributeCurrentYWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentY(success, failure, value); + }); +} + +- (void)writeAttributeDriftCompensationWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeDriftCompensation(success, failure, value); + }); +} + +- (void)writeAttributeCompensationTextWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCompensationText(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeColorTemperatureWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeColorTemperature(success, failure, value); + }); +} + +- (void)writeAttributeColorModeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeColorMode(success, failure, value); + }); +} + +- (void)writeAttributeNumberOfPrimariesWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNumberOfPrimaries(success, failure, value); + }); +} + +- (void)writeAttributePrimary1XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary1X(success, failure, value); + }); +} + +- (void)writeAttributePrimary1YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary1Y(success, failure, value); + }); +} + +- (void)writeAttributePrimary1IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary1Intensity(success, failure, value); + }); +} + +- (void)writeAttributePrimary2XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary2X(success, failure, value); + }); +} + +- (void)writeAttributePrimary2YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary2Y(success, failure, value); + }); +} + +- (void)writeAttributePrimary2IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary2Intensity(success, failure, value); + }); +} + +- (void)writeAttributePrimary3XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary3X(success, failure, value); + }); +} + +- (void)writeAttributePrimary3YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary3Y(success, failure, value); + }); +} + +- (void)writeAttributePrimary3IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary3Intensity(success, failure, value); + }); +} + +- (void)writeAttributePrimary4XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary4X(success, failure, value); + }); +} + +- (void)writeAttributePrimary4YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary4Y(success, failure, value); + }); +} + +- (void)writeAttributePrimary4IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary4Intensity(success, failure, value); + }); +} + +- (void)writeAttributePrimary5XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary5X(success, failure, value); + }); +} + +- (void)writeAttributePrimary5YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary5Y(success, failure, value); + }); +} + +- (void)writeAttributePrimary5IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary5Intensity(success, failure, value); + }); +} + +- (void)writeAttributePrimary6XWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary6X(success, failure, value); + }); +} + +- (void)writeAttributePrimary6YWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary6Y(success, failure, value); + }); +} + +- (void)writeAttributePrimary6IntensityWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePrimary6Intensity(success, failure, value); + }); +} + +- (void)writeAttributeEnhancedCurrentHueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeEnhancedCurrentHue(success, failure, value); + }); +} + +- (void)writeAttributeEnhancedColorModeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeEnhancedColorMode(success, failure, value); + }); +} + +- (void)writeAttributeColorLoopActiveWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeColorLoopActive(success, failure, value); + }); +} + +- (void)writeAttributeColorLoopDirectionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeColorLoopDirection(success, failure, value); + }); +} + +- (void)writeAttributeColorLoopTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeColorLoopTime(success, failure, value); + }); +} + +- (void)writeAttributeColorLoopStartEnhancedHueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeColorLoopStartEnhancedHue(success, failure, value); + }); +} + +- (void)writeAttributeColorLoopStoredEnhancedHueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeColorLoopStoredEnhancedHue(success, failure, value); + }); +} + +- (void)writeAttributeColorCapabilitiesWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeColorCapabilities(success, failure, value); + }); +} + +- (void)writeAttributeColorTempPhysicalMinWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeColorTempPhysicalMin(success, failure, value); + }); +} + +- (void)writeAttributeColorTempPhysicalMaxWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeColorTempPhysicalMax(success, failure, value); + }); +} + +- (void)writeAttributeCoupleColorTempToLevelMinMiredsWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCoupleColorTempToLevelMinMireds(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestContentLauncher () +@property (readonly) chip::Controller::ContentLauncherClusterTest cppCluster; +@end + +@implementation CHIPTestContentLauncher + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestDescriptor () +@property (readonly) chip::Controller::DescriptorClusterTest cppCluster; +@end + +@implementation CHIPTestDescriptor + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestDiagnosticLogs () +@property (readonly) chip::Controller::DiagnosticLogsClusterTest cppCluster; +@end + +@implementation CHIPTestDiagnosticLogs + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +@end + +@interface CHIPTestDoorLock () +@property (readonly) chip::Controller::DoorLockClusterTest cppCluster; +@end + +@implementation CHIPTestDoorLock + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeLockStateWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeLockState(success, failure, value); + }); +} + +- (void)writeAttributeLockTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeLockType(success, failure, value); + }); +} + +- (void)writeAttributeActuatorEnabledWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeActuatorEnabled(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestElectricalMeasurement () +@property (readonly) chip::Controller::ElectricalMeasurementClusterTest cppCluster; +@end + +@implementation CHIPTestElectricalMeasurement + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeMeasurementTypeWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMeasurementType(success, failure, value); + }); +} + +- (void)writeAttributeTotalActivePowerWithValue:(int32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTotalActivePower(success, failure, value); + }); +} + +- (void)writeAttributeRmsVoltageWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRmsVoltage(success, failure, value); + }); +} + +- (void)writeAttributeRmsVoltageMinWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRmsVoltageMin(success, failure, value); + }); +} + +- (void)writeAttributeRmsVoltageMaxWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRmsVoltageMax(success, failure, value); + }); +} + +- (void)writeAttributeRmsCurrentWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRmsCurrent(success, failure, value); + }); +} + +- (void)writeAttributeRmsCurrentMinWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRmsCurrentMin(success, failure, value); + }); +} + +- (void)writeAttributeRmsCurrentMaxWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRmsCurrentMax(success, failure, value); + }); +} + +- (void)writeAttributeActivePowerWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeActivePower(success, failure, value); + }); +} + +- (void)writeAttributeActivePowerMinWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeActivePowerMin(success, failure, value); + }); +} + +- (void)writeAttributeActivePowerMaxWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeActivePowerMax(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestEthernetNetworkDiagnostics () +@property (readonly) chip::Controller::EthernetNetworkDiagnosticsClusterTest cppCluster; +@end + +@implementation CHIPTestEthernetNetworkDiagnostics + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributePacketRxCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePacketRxCount(success, failure, value); + }); +} + +- (void)writeAttributePacketTxCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePacketTxCount(success, failure, value); + }); +} + +- (void)writeAttributeTxErrCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxErrCount(success, failure, value); + }); +} + +- (void)writeAttributeCollisionCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCollisionCount(success, failure, value); + }); +} + +- (void)writeAttributeOverrunCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOverrunCount(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestFixedLabel () +@property (readonly) chip::Controller::FixedLabelClusterTest cppCluster; +@end + +@implementation CHIPTestFixedLabel + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestFlowMeasurement () +@property (readonly) chip::Controller::FlowMeasurementClusterTest cppCluster; +@end + +@implementation CHIPTestFlowMeasurement + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeMinMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMinMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeMaxMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMaxMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestGeneralCommissioning () +@property (readonly) chip::Controller::GeneralCommissioningClusterTest cppCluster; +@end + +@implementation CHIPTestGeneralCommissioning + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestGeneralDiagnostics () +@property (readonly) chip::Controller::GeneralDiagnosticsClusterTest cppCluster; +@end + +@implementation CHIPTestGeneralDiagnostics + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeRebootCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRebootCount(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestGroupKeyManagement () +@property (readonly) chip::Controller::GroupKeyManagementClusterTest cppCluster; +@end + +@implementation CHIPTestGroupKeyManagement + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestGroups () +@property (readonly) chip::Controller::GroupsClusterTest cppCluster; +@end + +@implementation CHIPTestGroups + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeNameSupportWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNameSupport(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestIdentify () +@property (readonly) chip::Controller::IdentifyClusterTest cppCluster; +@end + +@implementation CHIPTestIdentify + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestKeypadInput () +@property (readonly) chip::Controller::KeypadInputClusterTest cppCluster; +@end + +@implementation CHIPTestKeypadInput + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestLevelControl () +@property (readonly) chip::Controller::LevelControlClusterTest cppCluster; +@end + +@implementation CHIPTestLevelControl + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeCurrentLevelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentLevel(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestLowPower () +@property (readonly) chip::Controller::LowPowerClusterTest cppCluster; +@end + +@implementation CHIPTestLowPower + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestMediaInput () +@property (readonly) chip::Controller::MediaInputClusterTest cppCluster; +@end + +@implementation CHIPTestMediaInput + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeCurrentMediaInputWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentMediaInput(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestMediaPlayback () +@property (readonly) chip::Controller::MediaPlaybackClusterTest cppCluster; +@end + +@implementation CHIPTestMediaPlayback + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestNetworkCommissioning () +@property (readonly) chip::Controller::NetworkCommissioningClusterTest cppCluster; +@end + +@implementation CHIPTestNetworkCommissioning + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeFeatureMapWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeFeatureMap(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestOtaSoftwareUpdateProvider () +@property (readonly) chip::Controller::OtaSoftwareUpdateProviderClusterTest cppCluster; +@end + +@implementation CHIPTestOtaSoftwareUpdateProvider + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestOccupancySensing () +@property (readonly) chip::Controller::OccupancySensingClusterTest cppCluster; +@end + +@implementation CHIPTestOccupancySensing + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeOccupancyWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOccupancy(success, failure, value); + }); +} + +- (void)writeAttributeOccupancySensorTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOccupancySensorType(success, failure, value); + }); +} + +- (void)writeAttributeOccupancySensorTypeBitmapWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOccupancySensorTypeBitmap(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestOnOff () +@property (readonly) chip::Controller::OnOffClusterTest cppCluster; +@end + +@implementation CHIPTestOnOff + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeOnOffWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOnOff(success, failure, value); + }); +} + +- (void)writeAttributeGlobalSceneControlWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeGlobalSceneControl(success, failure, value); + }); +} + +- (void)writeAttributeFeatureMapWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeFeatureMap(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestOnOffSwitchConfiguration () +@property (readonly) chip::Controller::OnOffSwitchConfigurationClusterTest cppCluster; +@end + +@implementation CHIPTestOnOffSwitchConfiguration + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeSwitchTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSwitchType(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestOperationalCredentials () +@property (readonly) chip::Controller::OperationalCredentialsClusterTest cppCluster; +@end + +@implementation CHIPTestOperationalCredentials + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeSupportedFabricsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSupportedFabrics(success, failure, value); + }); +} + +- (void)writeAttributeCommissionedFabricsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCommissionedFabrics(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestPressureMeasurement () +@property (readonly) chip::Controller::PressureMeasurementClusterTest cppCluster; +@end + +@implementation CHIPTestPressureMeasurement + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeMinMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMinMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeMaxMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMaxMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestPumpConfigurationAndControl () +@property (readonly) chip::Controller::PumpConfigurationAndControlClusterTest cppCluster; +@end + +@implementation CHIPTestPumpConfigurationAndControl + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeMaxPressureWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMaxPressure(success, failure, value); + }); +} + +- (void)writeAttributeMaxSpeedWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMaxSpeed(success, failure, value); + }); +} + +- (void)writeAttributeMaxFlowWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMaxFlow(success, failure, value); + }); +} + +- (void)writeAttributeEffectiveOperationModeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeEffectiveOperationMode(success, failure, value); + }); +} + +- (void)writeAttributeEffectiveControlModeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeEffectiveControlMode(success, failure, value); + }); +} + +- (void)writeAttributeCapacityWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCapacity(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestRelativeHumidityMeasurement () +@property (readonly) chip::Controller::RelativeHumidityMeasurementClusterTest cppCluster; +@end + +@implementation CHIPTestRelativeHumidityMeasurement + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeMeasuredValueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeMinMeasuredValueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMinMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeMaxMeasuredValueWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMaxMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestScenes () +@property (readonly) chip::Controller::ScenesClusterTest cppCluster; +@end + +@implementation CHIPTestScenes + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeSceneCountWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSceneCount(success, failure, value); + }); +} + +- (void)writeAttributeCurrentSceneWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentScene(success, failure, value); + }); +} + +- (void)writeAttributeCurrentGroupWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentGroup(success, failure, value); + }); +} + +- (void)writeAttributeSceneValidWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSceneValid(success, failure, value); + }); +} + +- (void)writeAttributeNameSupportWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNameSupport(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestSoftwareDiagnostics () +@property (readonly) chip::Controller::SoftwareDiagnosticsClusterTest cppCluster; +@end + +@implementation CHIPTestSoftwareDiagnostics + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeCurrentHeapHighWatermarkWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentHeapHighWatermark(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestSwitch () +@property (readonly) chip::Controller::SwitchClusterTest cppCluster; +@end + +@implementation CHIPTestSwitch + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeNumberOfPositionsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNumberOfPositions(success, failure, value); + }); +} + +- (void)writeAttributeCurrentPositionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentPosition(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestTvChannel () +@property (readonly) chip::Controller::TvChannelClusterTest cppCluster; +@end + +@implementation CHIPTestTvChannel + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeTvChannelLineupWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTvChannelLineup(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeCurrentTvChannelWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentTvChannel(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestTargetNavigator () +@property (readonly) chip::Controller::TargetNavigatorClusterTest cppCluster; +@end + +@implementation CHIPTestTargetNavigator + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestTemperatureMeasurement () +@property (readonly) chip::Controller::TemperatureMeasurementClusterTest cppCluster; +@end + +@implementation CHIPTestTemperatureMeasurement + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeMinMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMinMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeMaxMeasuredValueWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMaxMeasuredValue(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestTestCluster () +@property (readonly) chip::Controller::TestClusterClusterTest cppCluster; +@end + +@implementation CHIPTestTestCluster + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestThermostat () +@property (readonly) chip::Controller::ThermostatClusterTest cppCluster; +@end + +@implementation CHIPTestThermostat + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeLocalTemperatureWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeLocalTemperature(success, failure, value); + }); +} + +- (void)writeAttributeAbsMinHeatSetpointLimitWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeAbsMinHeatSetpointLimit(success, failure, value); + }); +} + +- (void)writeAttributeAbsMaxHeatSetpointLimitWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeAbsMaxHeatSetpointLimit(success, failure, value); + }); +} + +- (void)writeAttributeAbsMinCoolSetpointLimitWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeAbsMinCoolSetpointLimit(success, failure, value); + }); +} + +- (void)writeAttributeAbsMaxCoolSetpointLimitWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeAbsMaxCoolSetpointLimit(success, failure, value); + }); +} + +- (void)writeAttributeStartOfWeekWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeStartOfWeek(success, failure, value); + }); +} + +- (void)writeAttributeNumberOfWeeklyTransitionsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNumberOfWeeklyTransitions(success, failure, value); + }); +} + +- (void)writeAttributeNumberOfDailyTransitionsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNumberOfDailyTransitions(success, failure, value); + }); +} + +- (void)writeAttributeFeatureMapWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeFeatureMap(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestThermostatUserInterfaceConfiguration () +@property (readonly) chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cppCluster; +@end + +@implementation CHIPTestThermostatUserInterfaceConfiguration + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestThreadNetworkDiagnostics () +@property (readonly) chip::Controller::ThreadNetworkDiagnosticsClusterTest cppCluster; +@end + +@implementation CHIPTestThreadNetworkDiagnostics + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeChannelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeChannel(success, failure, value); + }); +} + +- (void)writeAttributeRoutingRoleWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRoutingRole(success, failure, value); + }); +} + +- (void)writeAttributeNetworkNameWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNetworkName(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributePanIdWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePanId(success, failure, value); + }); +} + +- (void)writeAttributeExtendedPanIdWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeExtendedPanId(success, failure, value); + }); +} + +- (void)writeAttributeMeshLocalPrefixWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMeshLocalPrefix(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeOverrunCountWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOverrunCount(success, failure, value); + }); +} + +- (void)writeAttributePartitionIdWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePartitionId(success, failure, value); + }); +} + +- (void)writeAttributeWeightingWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeWeighting(success, failure, value); + }); +} + +- (void)writeAttributeDataVersionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeDataVersion(success, failure, value); + }); +} + +- (void)writeAttributeStableDataVersionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeStableDataVersion(success, failure, value); + }); +} + +- (void)writeAttributeLeaderRouterIdWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeLeaderRouterId(success, failure, value); + }); +} + +- (void)writeAttributeDetachedRoleCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeDetachedRoleCount(success, failure, value); + }); +} + +- (void)writeAttributeChildRoleCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeChildRoleCount(success, failure, value); + }); +} + +- (void)writeAttributeRouterRoleCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRouterRoleCount(success, failure, value); + }); +} + +- (void)writeAttributeLeaderRoleCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeLeaderRoleCount(success, failure, value); + }); +} + +- (void)writeAttributeAttachAttemptCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeAttachAttemptCount(success, failure, value); + }); +} + +- (void)writeAttributePartitionIdChangeCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributePartitionIdChangeCount(success, failure, value); + }); +} + +- (void)writeAttributeBetterPartitionAttachAttemptCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeBetterPartitionAttachAttemptCount(success, failure, value); + }); +} + +- (void)writeAttributeParentChangeCountWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeParentChangeCount(success, failure, value); + }); +} + +- (void)writeAttributeTxTotalCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxTotalCount(success, failure, value); + }); +} + +- (void)writeAttributeTxUnicastCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxUnicastCount(success, failure, value); + }); +} + +- (void)writeAttributeTxBroadcastCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxBroadcastCount(success, failure, value); + }); +} + +- (void)writeAttributeTxAckRequestedCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxAckRequestedCount(success, failure, value); + }); +} + +- (void)writeAttributeTxAckedCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxAckedCount(success, failure, value); + }); +} + +- (void)writeAttributeTxNoAckRequestedCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxNoAckRequestedCount(success, failure, value); + }); +} + +- (void)writeAttributeTxDataCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxDataCount(success, failure, value); + }); +} + +- (void)writeAttributeTxDataPollCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxDataPollCount(success, failure, value); + }); +} + +- (void)writeAttributeTxBeaconCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxBeaconCount(success, failure, value); + }); +} + +- (void)writeAttributeTxBeaconRequestCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxBeaconRequestCount(success, failure, value); + }); +} + +- (void)writeAttributeTxOtherCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxOtherCount(success, failure, value); + }); +} + +- (void)writeAttributeTxRetryCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxRetryCount(success, failure, value); + }); +} + +- (void)writeAttributeTxDirectMaxRetryExpiryCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxDirectMaxRetryExpiryCount(success, failure, value); + }); +} + +- (void)writeAttributeTxIndirectMaxRetryExpiryCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxIndirectMaxRetryExpiryCount(success, failure, value); + }); +} + +- (void)writeAttributeTxErrCcaCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxErrCcaCount(success, failure, value); + }); +} + +- (void)writeAttributeTxErrAbortCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxErrAbortCount(success, failure, value); + }); +} + +- (void)writeAttributeTxErrBusyChannelCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTxErrBusyChannelCount(success, failure, value); + }); +} + +- (void)writeAttributeRxTotalCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxTotalCount(success, failure, value); + }); +} + +- (void)writeAttributeRxUnicastCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxUnicastCount(success, failure, value); + }); +} + +- (void)writeAttributeRxBroadcastCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxBroadcastCount(success, failure, value); + }); +} + +- (void)writeAttributeRxDataCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxDataCount(success, failure, value); + }); +} + +- (void)writeAttributeRxDataPollCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxDataPollCount(success, failure, value); + }); +} + +- (void)writeAttributeRxBeaconCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxBeaconCount(success, failure, value); + }); +} + +- (void)writeAttributeRxBeaconRequestCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxBeaconRequestCount(success, failure, value); + }); +} + +- (void)writeAttributeRxOtherCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxOtherCount(success, failure, value); + }); +} + +- (void)writeAttributeRxAddressFilteredCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxAddressFilteredCount(success, failure, value); + }); +} + +- (void)writeAttributeRxDestAddrFilteredCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxDestAddrFilteredCount(success, failure, value); + }); +} + +- (void)writeAttributeRxDuplicatedCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxDuplicatedCount(success, failure, value); + }); +} + +- (void)writeAttributeRxErrNoFrameCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxErrNoFrameCount(success, failure, value); + }); +} + +- (void)writeAttributeRxErrUnknownNeighborCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxErrUnknownNeighborCount(success, failure, value); + }); +} + +- (void)writeAttributeRxErrInvalidSrcAddrCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxErrInvalidSrcAddrCount(success, failure, value); + }); +} + +- (void)writeAttributeRxErrSecCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxErrSecCount(success, failure, value); + }); +} + +- (void)writeAttributeRxErrFcsCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxErrFcsCount(success, failure, value); + }); +} + +- (void)writeAttributeRxErrOtherCountWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRxErrOtherCount(success, failure, value); + }); +} + +- (void)writeAttributeChannelMaskWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeChannelMask(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestWakeOnLan () +@property (readonly) chip::Controller::WakeOnLanClusterTest cppCluster; +@end + +@implementation CHIPTestWakeOnLan + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeWakeOnLanMacAddressWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeWakeOnLanMacAddress(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestWiFiNetworkDiagnostics () +@property (readonly) chip::Controller::WiFiNetworkDiagnosticsClusterTest cppCluster; +@end + +@implementation CHIPTestWiFiNetworkDiagnostics + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeBssidWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeBssid(success, failure, [self asSpan:value]); + }); +} + +- (void)writeAttributeSecurityTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSecurityType(success, failure, value); + }); +} + +- (void)writeAttributeWiFiVersionWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeWiFiVersion(success, failure, value); + }); +} + +- (void)writeAttributeChannelNumberWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeChannelNumber(success, failure, value); + }); +} + +- (void)writeAttributeRssiWithValue:(int8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRssi(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + +@interface CHIPTestWindowCovering () +@property (readonly) chip::Controller::WindowCoveringClusterTest cppCluster; +@end + +@implementation CHIPTestWindowCovering + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeType(success, failure, value); + }); +} + +- (void)writeAttributeCurrentPositionLiftWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentPositionLift(success, failure, value); + }); +} + +- (void)writeAttributeCurrentPositionTiltWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentPositionTilt(success, failure, value); + }); +} + +- (void)writeAttributeConfigStatusWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeConfigStatus(success, failure, value); + }); +} + +- (void)writeAttributeCurrentPositionLiftPercentageWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentPositionLiftPercentage(success, failure, value); + }); +} + +- (void)writeAttributeCurrentPositionTiltPercentageWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentPositionTiltPercentage(success, failure, value); + }); +} + +- (void)writeAttributeOperationalStatusWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOperationalStatus(success, failure, value); + }); +} + +- (void)writeAttributeTargetPositionLiftPercent100thsWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTargetPositionLiftPercent100ths(success, failure, value); + }); +} + +- (void)writeAttributeTargetPositionTiltPercent100thsWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeTargetPositionTiltPercent100ths(success, failure, value); + }); +} + +- (void)writeAttributeEndProductTypeWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeEndProductType(success, failure, value); + }); +} + +- (void)writeAttributeCurrentPositionLiftPercent100thsWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentPositionLiftPercent100ths(success, failure, value); + }); +} + +- (void)writeAttributeCurrentPositionTiltPercent100thsWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentPositionTiltPercent100ths(success, failure, value); + }); +} + +- (void)writeAttributeInstalledOpenLimitLiftWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeInstalledOpenLimitLift(success, failure, value); + }); +} + +- (void)writeAttributeInstalledClosedLimitLiftWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeInstalledClosedLimitLift(success, failure, value); + }); +} + +- (void)writeAttributeInstalledOpenLimitTiltWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeInstalledOpenLimitTilt(success, failure, value); + }); +} + +- (void)writeAttributeInstalledClosedLimitTiltWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeInstalledClosedLimitTilt(success, failure, value); + }); +} + +- (void)writeAttributeSafetyStatusWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSafetyStatus(success, failure, value); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 115c50b9cf76ef..e3e4e2dd1653e1 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -22,6 +22,7 @@ // module headers #import +#import // system dependencies #import @@ -238,7 +239,7 @@ - (void)testSendClusterTestCluster_000000_Test XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster test:^(NSError * err, NSDictionary * values) { @@ -255,7 +256,7 @@ - (void)testSendClusterTestCluster_000001_TestNotHandled XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Not Handled Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster testNotHandled:^(NSError * err, NSDictionary * values) { @@ -272,7 +273,7 @@ - (void)testSendClusterTestCluster_000002_TestSpecific XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Specific Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster testSpecific:^(NSError * err, NSDictionary * values) { @@ -290,7 +291,7 @@ - (void)testSendClusterTestCluster_000003_TestAddArguments XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Add Arguments Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t arg1Argument = 3; @@ -312,7 +313,7 @@ - (void)testSendClusterTestCluster_000004_TestAddArguments XCTestExpectation * expectation = [self expectationWithDescription:@"Send failing Test Add Arguments Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t arg1Argument = 250; @@ -333,7 +334,7 @@ - (void)testSendClusterTestCluster_000005_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BOOLEAN Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBooleanWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -351,7 +352,7 @@ - (void)testSendClusterTestCluster_000006_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BOOLEAN True"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); bool booleanArgument = 1; @@ -370,7 +371,7 @@ - (void)testSendClusterTestCluster_000007_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BOOLEAN True"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBooleanWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -388,7 +389,7 @@ - (void)testSendClusterTestCluster_000008_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BOOLEAN False"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); bool booleanArgument = 0; @@ -407,7 +408,7 @@ - (void)testSendClusterTestCluster_000009_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BOOLEAN False"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBooleanWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -425,7 +426,7 @@ - (void)testSendClusterTestCluster_000010_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP8 Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap8WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -443,7 +444,7 @@ - (void)testSendClusterTestCluster_000011_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP8 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t bitmap8Argument = 255; @@ -462,7 +463,7 @@ - (void)testSendClusterTestCluster_000012_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP8 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap8WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -480,7 +481,7 @@ - (void)testSendClusterTestCluster_000013_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP8 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t bitmap8Argument = 0; @@ -499,7 +500,7 @@ - (void)testSendClusterTestCluster_000014_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP8 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap8WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -517,7 +518,7 @@ - (void)testSendClusterTestCluster_000015_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP16 Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap16WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -535,7 +536,7 @@ - (void)testSendClusterTestCluster_000016_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP16 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t bitmap16Argument = 65535U; @@ -554,7 +555,7 @@ - (void)testSendClusterTestCluster_000017_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP16 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap16WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -572,7 +573,7 @@ - (void)testSendClusterTestCluster_000018_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP16 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t bitmap16Argument = 0U; @@ -591,7 +592,7 @@ - (void)testSendClusterTestCluster_000019_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP16 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap16WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -609,7 +610,7 @@ - (void)testSendClusterTestCluster_000020_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP32 Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap32WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -627,7 +628,7 @@ - (void)testSendClusterTestCluster_000021_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP32 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint32_t bitmap32Argument = 4294967295UL; @@ -646,7 +647,7 @@ - (void)testSendClusterTestCluster_000022_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP32 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap32WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -664,7 +665,7 @@ - (void)testSendClusterTestCluster_000023_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP32 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint32_t bitmap32Argument = 0UL; @@ -683,7 +684,7 @@ - (void)testSendClusterTestCluster_000024_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP32 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap32WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -701,7 +702,7 @@ - (void)testSendClusterTestCluster_000025_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP64 Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap64WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -719,7 +720,7 @@ - (void)testSendClusterTestCluster_000026_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP64 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint64_t bitmap64Argument = 18446744073709551615ULL; @@ -738,7 +739,7 @@ - (void)testSendClusterTestCluster_000027_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP64 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap64WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -756,7 +757,7 @@ - (void)testSendClusterTestCluster_000028_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute BITMAP64 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint64_t bitmap64Argument = 0ULL; @@ -775,7 +776,7 @@ - (void)testSendClusterTestCluster_000029_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute BITMAP64 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeBitmap64WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -793,7 +794,7 @@ - (void)testSendClusterTestCluster_000030_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8U Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt8uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -811,7 +812,7 @@ - (void)testSendClusterTestCluster_000031_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT8U Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t int8uArgument = 255; @@ -830,7 +831,7 @@ - (void)testSendClusterTestCluster_000032_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8U Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt8uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -848,7 +849,7 @@ - (void)testSendClusterTestCluster_000033_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT8U Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t int8uArgument = 0; @@ -867,7 +868,7 @@ - (void)testSendClusterTestCluster_000034_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8U Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt8uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -885,7 +886,7 @@ - (void)testSendClusterTestCluster_000035_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16U Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt16uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -903,7 +904,7 @@ - (void)testSendClusterTestCluster_000036_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT16U Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t int16uArgument = 65535U; @@ -922,7 +923,7 @@ - (void)testSendClusterTestCluster_000037_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16U Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt16uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -940,7 +941,7 @@ - (void)testSendClusterTestCluster_000038_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT16U Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t int16uArgument = 0U; @@ -959,7 +960,7 @@ - (void)testSendClusterTestCluster_000039_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16U Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt16uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -977,7 +978,7 @@ - (void)testSendClusterTestCluster_000040_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32U Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt32uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -995,7 +996,7 @@ - (void)testSendClusterTestCluster_000041_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT32U Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint32_t int32uArgument = 4294967295UL; @@ -1014,7 +1015,7 @@ - (void)testSendClusterTestCluster_000042_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32U Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt32uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1032,7 +1033,7 @@ - (void)testSendClusterTestCluster_000043_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT32U Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint32_t int32uArgument = 0UL; @@ -1051,7 +1052,7 @@ - (void)testSendClusterTestCluster_000044_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32U Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt32uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1069,7 +1070,7 @@ - (void)testSendClusterTestCluster_000045_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64U Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt64uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1087,7 +1088,7 @@ - (void)testSendClusterTestCluster_000046_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT64U Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint64_t int64uArgument = 18446744073709551615ULL; @@ -1106,7 +1107,7 @@ - (void)testSendClusterTestCluster_000047_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64U Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt64uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1124,7 +1125,7 @@ - (void)testSendClusterTestCluster_000048_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT64U Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint64_t int64uArgument = 0ULL; @@ -1143,7 +1144,7 @@ - (void)testSendClusterTestCluster_000049_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64U Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt64uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1161,7 +1162,7 @@ - (void)testSendClusterTestCluster_000050_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt8sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1179,7 +1180,7 @@ - (void)testSendClusterTestCluster_000051_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT8S Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int8_t int8sArgument = 127; @@ -1198,7 +1199,7 @@ - (void)testSendClusterTestCluster_000052_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8S Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt8sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1216,7 +1217,7 @@ - (void)testSendClusterTestCluster_000053_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT8S Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int8_t int8sArgument = -128; @@ -1235,7 +1236,7 @@ - (void)testSendClusterTestCluster_000054_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8S Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt8sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1253,7 +1254,7 @@ - (void)testSendClusterTestCluster_000055_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT8S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int8_t int8sArgument = 0; @@ -1272,7 +1273,7 @@ - (void)testSendClusterTestCluster_000056_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT8S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt8sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1290,7 +1291,7 @@ - (void)testSendClusterTestCluster_000057_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt16sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1308,7 +1309,7 @@ - (void)testSendClusterTestCluster_000058_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT16S Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int16_t int16sArgument = 32767; @@ -1327,7 +1328,7 @@ - (void)testSendClusterTestCluster_000059_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16S Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt16sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1345,7 +1346,7 @@ - (void)testSendClusterTestCluster_000060_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT16S Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int16_t int16sArgument = -32768; @@ -1364,7 +1365,7 @@ - (void)testSendClusterTestCluster_000061_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16S Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt16sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1382,7 +1383,7 @@ - (void)testSendClusterTestCluster_000062_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT16S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int16_t int16sArgument = 0; @@ -1401,7 +1402,7 @@ - (void)testSendClusterTestCluster_000063_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT16S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt16sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1419,7 +1420,7 @@ - (void)testSendClusterTestCluster_000064_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt32sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1437,7 +1438,7 @@ - (void)testSendClusterTestCluster_000065_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT32S Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int32_t int32sArgument = 2147483647L; @@ -1456,7 +1457,7 @@ - (void)testSendClusterTestCluster_000066_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32S Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt32sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1474,7 +1475,7 @@ - (void)testSendClusterTestCluster_000067_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT32S Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int32_t int32sArgument = -2147483648L; @@ -1493,7 +1494,7 @@ - (void)testSendClusterTestCluster_000068_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32S Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt32sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1511,7 +1512,7 @@ - (void)testSendClusterTestCluster_000069_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT32S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int32_t int32sArgument = 0L; @@ -1530,7 +1531,7 @@ - (void)testSendClusterTestCluster_000070_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT32S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt32sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1548,7 +1549,7 @@ - (void)testSendClusterTestCluster_000071_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt64sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1566,7 +1567,7 @@ - (void)testSendClusterTestCluster_000072_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT64S Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int64_t int64sArgument = 9223372036854775807LL; @@ -1585,7 +1586,7 @@ - (void)testSendClusterTestCluster_000073_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64S Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt64sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1603,7 +1604,7 @@ - (void)testSendClusterTestCluster_000074_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT64S Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int64_t int64sArgument = -9223372036854775807LL; @@ -1622,7 +1623,7 @@ - (void)testSendClusterTestCluster_000075_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64S Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt64sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1640,7 +1641,7 @@ - (void)testSendClusterTestCluster_000076_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute INT64S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int64_t int64sArgument = 0LL; @@ -1659,7 +1660,7 @@ - (void)testSendClusterTestCluster_000077_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute INT64S Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInt64sWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1677,7 +1678,7 @@ - (void)testSendClusterTestCluster_000078_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM8 Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeEnum8WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1695,7 +1696,7 @@ - (void)testSendClusterTestCluster_000079_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute ENUM8 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t enum8Argument = 255; @@ -1714,7 +1715,7 @@ - (void)testSendClusterTestCluster_000080_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM8 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeEnum8WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1732,7 +1733,7 @@ - (void)testSendClusterTestCluster_000081_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute ENUM8 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t enum8Argument = 0; @@ -1751,7 +1752,7 @@ - (void)testSendClusterTestCluster_000082_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM8 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeEnum8WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1769,7 +1770,7 @@ - (void)testSendClusterTestCluster_000083_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM16 Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeEnum16WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1787,7 +1788,7 @@ - (void)testSendClusterTestCluster_000084_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute ENUM16 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t enum16Argument = 65535U; @@ -1806,7 +1807,7 @@ - (void)testSendClusterTestCluster_000085_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM16 Max Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeEnum16WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1824,7 +1825,7 @@ - (void)testSendClusterTestCluster_000086_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute ENUM16 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t enum16Argument = 0U; @@ -1843,7 +1844,7 @@ - (void)testSendClusterTestCluster_000087_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute ENUM16 Min Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeEnum16WithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1861,7 +1862,7 @@ - (void)testSendClusterTestCluster_000088_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute OCTET_STRING Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1881,7 +1882,7 @@ - (void)testSendClusterTestCluster_000089_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute OCTET_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); NSString * octetStringArgumentString = @"TestValue"; @@ -1901,7 +1902,7 @@ - (void)testSendClusterTestCluster_000090_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute OCTET_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1921,7 +1922,7 @@ - (void)testSendClusterTestCluster_000091_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute OCTET_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); NSString * octetStringArgumentString = @"TestValueLongerThan10"; @@ -1941,7 +1942,7 @@ - (void)testSendClusterTestCluster_000092_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute OCTET_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -1961,7 +1962,7 @@ - (void)testSendClusterTestCluster_000093_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute OCTET_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); NSString * octetStringArgumentString = @""; @@ -1981,7 +1982,7 @@ - (void)testSendClusterTestCluster_000094_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LONG_OCTET_STRING Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeLongOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2001,7 +2002,7 @@ - (void)testSendClusterTestCluster_000095_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LONG_OCTET_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); NSString * longOctetStringArgumentString @@ -2024,7 +2025,7 @@ - (void)testSendClusterTestCluster_000096_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LONG_OCTET_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeLongOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2047,7 +2048,7 @@ - (void)testSendClusterTestCluster_000097_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LONG_OCTET_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); NSString * longOctetStringArgumentString = @""; @@ -2067,7 +2068,7 @@ - (void)testSendClusterTestCluster_000098_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute CHAR_STRING Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeCharStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2086,7 +2087,7 @@ - (void)testSendClusterTestCluster_000099_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); NSString * charStringArgument = @"☉T☉"; @@ -2105,7 +2106,7 @@ - (void)testSendClusterTestCluster_000100_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING - Value too long"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); NSString * charStringArgument = @"☉TestValueLongerThan10☉"; @@ -2124,7 +2125,7 @@ - (void)testSendClusterTestCluster_000101_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute CHAR_STRING - Empty"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); NSString * charStringArgument = @""; @@ -2143,7 +2144,7 @@ - (void)testSendClusterTestCluster_000102_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LONG_CHAR_STRING Default Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeLongCharStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2162,7 +2163,7 @@ - (void)testSendClusterTestCluster_000103_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LONG_CHAR_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); NSString * longCharStringArgument @@ -2184,7 +2185,7 @@ - (void)testSendClusterTestCluster_000104_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LONG_CHAR_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeLongCharStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2206,7 +2207,7 @@ - (void)testSendClusterTestCluster_000105_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LONG_CHAR_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); NSString * longCharStringArgument = @""; @@ -2225,7 +2226,7 @@ - (void)testSendClusterTestCluster_000106_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeListInt8uWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2243,7 +2244,7 @@ - (void)testSendClusterTestCluster_000107_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST_OCTET_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeListOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2261,7 +2262,7 @@ - (void)testSendClusterTestCluster_000108_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST_STRUCT_OCTET_STRING"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeListStructOctetStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2279,7 +2280,7 @@ - (void)testSendClusterTestCluster_000109_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute UNSUPPORTED"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeUnsupportedWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2302,7 +2303,7 @@ - (void)testSendClusterTestCluster_000110_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Writeattribute UNSUPPORTED"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); bool unsupportedArgument = 0; @@ -2326,7 +2327,7 @@ - (void)testSendClusterTestCluster_000111_Test XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command to unsupported endpoint"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:200 queue:queue]; + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:200 queue:queue]; XCTAssertNotNil(cluster); [cluster test:^(NSError * err, NSDictionary * values) { @@ -2352,7 +2353,7 @@ - (void)testSendClusterTest_TC_OO_1_1_000000_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2365,12 +2366,33 @@ - (void)testSendClusterTest_TC_OO_1_1_000000_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_1_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_OO_1_1_000001_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint16_t clusterRevisionArgument = 3U; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_OO_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2383,12 +2405,12 @@ - (void)testSendClusterTest_TC_OO_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_1_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_OO_1_1_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional global attribute: FeatureMap"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeFeatureMapWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2401,12 +2423,32 @@ - (void)testSendClusterTest_TC_OO_1_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OO_1_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_OO_1_1_000004_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to optional global attribute: FeatureMap"]; + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint32_t featureMapArgument = 0UL; + [cluster writeAttributeFeatureMapWithValue:featureMapArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write the default values to optional global attribute: FeatureMap Error: %@", err); + + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_OO_1_1_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads back optional global attribute: FeatureMap"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeFeatureMapWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2425,7 +2467,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000000_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: OnOff"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2443,7 +2485,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"reads back mandatory attribute: OnOff"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2461,7 +2503,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000002_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: GlobalSceneControl"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeGlobalSceneControlWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2479,7 +2521,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000003_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: OnTime"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2497,7 +2539,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000004_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: OffWaitTime"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOffWaitTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2515,7 +2557,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000005_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read LT attribute: StartUpOnOff"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeStartUpOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2533,7 +2575,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000006_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to LT attribute: OnTime"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t onTimeArgument = 0U; @@ -2552,7 +2594,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000007_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to LT attribute: OffWaitTime"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t offWaitTimeArgument = 0U; @@ -2571,7 +2613,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000008_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"write the default value to LT attribute: StartUpOnOff"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t startUpOnOffArgument = 0; @@ -2590,7 +2632,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000009_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"reads back LT attribute: OnTime"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2608,7 +2650,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000010_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"reads back LT attribute: OffWaitTime"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOffWaitTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2626,7 +2668,7 @@ - (void)testSendClusterTest_TC_OO_2_1_000011_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"reads back LT attribute: StartUpOnOff"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeStartUpOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2645,7 +2687,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000000_Off XCTestExpectation * expectation = [self expectationWithDescription:@"Send Off Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster off:^(NSError * err, NSDictionary * values) { @@ -2662,7 +2704,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2680,7 +2722,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000002_On XCTestExpectation * expectation = [self expectationWithDescription:@"Send On Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster on:^(NSError * err, NSDictionary * values) { @@ -2697,7 +2739,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000003_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2715,7 +2757,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000004_Off XCTestExpectation * expectation = [self expectationWithDescription:@"Send Off Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster off:^(NSError * err, NSDictionary * values) { @@ -2732,7 +2774,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000005_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2750,7 +2792,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000006_Toggle XCTestExpectation * expectation = [self expectationWithDescription:@"Send Toggle Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster toggle:^(NSError * err, NSDictionary * values) { @@ -2768,7 +2810,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000007_ReadAttribute [self expectationWithDescription:@"Check on/off attribute value is true after toggle command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2786,7 +2828,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000008_Toggle XCTestExpectation * expectation = [self expectationWithDescription:@"Send Toggle Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster toggle:^(NSError * err, NSDictionary * values) { @@ -2804,7 +2846,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000009_ReadAttribute [self expectationWithDescription:@"Check on/off attribute value is false after toggle command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2822,7 +2864,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000010_On XCTestExpectation * expectation = [self expectationWithDescription:@"Send On Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster on:^(NSError * err, NSDictionary * values) { @@ -2839,7 +2881,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000011_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2857,7 +2899,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000012_Off XCTestExpectation * expectation = [self expectationWithDescription:@"Send Off Command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster off:^(NSError * err, NSDictionary * values) { @@ -2874,7 +2916,7 @@ - (void)testSendClusterTest_TC_OO_2_2_000013_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2893,7 +2935,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000000_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query Interaction Model Version"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeInteractionModelVersionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2910,7 +2952,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query Vendor Name"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeVendorNameWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2928,7 +2970,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000002_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query VendorID"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeVendorIDWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2945,7 +2987,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000003_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query Product Name"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeProductNameWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2963,7 +3005,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000004_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query ProductID"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeProductIDWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2980,7 +3022,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000005_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query User Label"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeUserLabelWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -2998,7 +3040,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000006_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query User Location"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeLocationWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3016,7 +3058,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000007_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query HardwareVersion"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeHardwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3033,7 +3075,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000008_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query HardwareVersionString"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeHardwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3052,7 +3094,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000009_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query SoftwareVersion"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeSoftwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3069,7 +3111,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000010_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query SoftwareVersionString"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeSoftwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3088,7 +3130,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000011_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query ManufacturingDate"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeManufacturingDateWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3112,7 +3154,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000012_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query PartNumber"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributePartNumberWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3135,7 +3177,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000013_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query ProductURL"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeProductURLWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3158,7 +3200,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000014_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query ProductLabel"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeProductLabelWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3181,7 +3223,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000015_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query SerialNumber"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeSerialNumberWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3204,7 +3246,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000016_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query LocalConfigDisabled"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeLocalConfigDisabledWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3226,7 +3268,7 @@ - (void)testSendClusterTest_TC_DM_1_1_000017_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Query Reachable"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeReachableWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3249,7 +3291,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000000_On XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster on:^(NSError * err, NSDictionary * values) { @@ -3266,7 +3308,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3284,7 +3326,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000002_MoveToHue XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue shortest distance command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t hueArgument = 150; @@ -3311,7 +3353,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000003_MoveToHue XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue longest distance command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t hueArgument = 200; @@ -3338,7 +3380,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000004_MoveToHue XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue up command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t hueArgument = 250; @@ -3365,7 +3407,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000005_MoveToHue XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue down command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t hueArgument = 225; @@ -3392,7 +3434,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000006_MoveHue XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue up command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 1; @@ -3417,7 +3459,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000007_MoveHue XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue stop command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 0; @@ -3442,7 +3484,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000008_MoveHue XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue down command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 3; @@ -3467,7 +3509,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000009_MoveHue XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue stop command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 0; @@ -3492,7 +3534,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000010_StepHue XCTestExpectation * expectation = [self expectationWithDescription:@"Step hue up command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t stepModeArgument = 1; @@ -3519,7 +3561,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000011_StepHue XCTestExpectation * expectation = [self expectationWithDescription:@"Step hue down command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t stepModeArgument = 3; @@ -3546,7 +3588,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000012_MoveToSaturation XCTestExpectation * expectation = [self expectationWithDescription:@"Move to saturation command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t saturationArgument = 90; @@ -3571,7 +3613,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000013_MoveSaturation XCTestExpectation * expectation = [self expectationWithDescription:@"Move saturation up command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 1; @@ -3596,7 +3638,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000014_MoveSaturation XCTestExpectation * expectation = [self expectationWithDescription:@"Move saturation down command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 3; @@ -3621,7 +3663,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000015_StepSaturation XCTestExpectation * expectation = [self expectationWithDescription:@"Step saturation up command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t stepModeArgument = 1; @@ -3648,7 +3690,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000016_StepSaturation XCTestExpectation * expectation = [self expectationWithDescription:@"Step saturation down command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t stepModeArgument = 3; @@ -3675,7 +3717,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000017_MoveToHueAndSaturation XCTestExpectation * expectation = [self expectationWithDescription:@"Move To current hue and saturation command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t hueArgument = 40; @@ -3702,7 +3744,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000018_Off XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster off:^(NSError * err, NSDictionary * values) { @@ -3719,7 +3761,7 @@ - (void)testSendClusterTest_TC_CC_3_4_000019_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3738,7 +3780,7 @@ - (void)testSendClusterTest_TC_CC_5_000000_On XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster on:^(NSError * err, NSDictionary * values) { @@ -3755,7 +3797,7 @@ - (void)testSendClusterTest_TC_CC_5_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3773,7 +3815,7 @@ - (void)testSendClusterTest_TC_CC_5_000002_MoveToColor XCTestExpectation * expectation = [self expectationWithDescription:@"Move to Color command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t colorXArgument = 200U; @@ -3800,7 +3842,7 @@ - (void)testSendClusterTest_TC_CC_5_000003_MoveColor XCTestExpectation * expectation = [self expectationWithDescription:@"Move Color command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int16_t rateXArgument = 15; @@ -3825,7 +3867,7 @@ - (void)testSendClusterTest_TC_CC_5_000004_StopMoveStep XCTestExpectation * expectation = [self expectationWithDescription:@"Stop Move Step command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t optionsMaskArgument = 0; @@ -3846,7 +3888,7 @@ - (void)testSendClusterTest_TC_CC_5_000005_StepColor XCTestExpectation * expectation = [self expectationWithDescription:@"Step Color command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); int16_t stepXArgument = 15; @@ -3873,7 +3915,7 @@ - (void)testSendClusterTest_TC_CC_5_000006_Off XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster off:^(NSError * err, NSDictionary * values) { @@ -3890,7 +3932,7 @@ - (void)testSendClusterTest_TC_CC_5_000007_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3909,7 +3951,7 @@ - (void)testSendClusterTest_TC_CC_6_000000_On XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster on:^(NSError * err, NSDictionary * values) { @@ -3926,7 +3968,7 @@ - (void)testSendClusterTest_TC_CC_6_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -3944,7 +3986,7 @@ - (void)testSendClusterTest_TC_CC_6_000002_MoveToColorTemperature XCTestExpectation * expectation = [self expectationWithDescription:@"Move To Color Temperature command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t colorTemperatureArgument = 100U; @@ -3969,7 +4011,7 @@ - (void)testSendClusterTest_TC_CC_6_000003_MoveColorTemperature XCTestExpectation * expectation = [self expectationWithDescription:@"Move up color temperature command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 1; @@ -3998,7 +4040,7 @@ - (void)testSendClusterTest_TC_CC_6_000004_MoveColorTemperature XCTestExpectation * expectation = [self expectationWithDescription:@"Stop Color Temperature command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 0; @@ -4027,7 +4069,7 @@ - (void)testSendClusterTest_TC_CC_6_000005_MoveColorTemperature XCTestExpectation * expectation = [self expectationWithDescription:@"Move down color temperature command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 3; @@ -4056,7 +4098,7 @@ - (void)testSendClusterTest_TC_CC_6_000006_StepColorTemperature XCTestExpectation * expectation = [self expectationWithDescription:@"Step up color temperature command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t stepModeArgument = 1; @@ -4087,7 +4129,7 @@ - (void)testSendClusterTest_TC_CC_6_000007_StepColorTemperature XCTestExpectation * expectation = [self expectationWithDescription:@"Step down color temperature command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t stepModeArgument = 3; @@ -4118,7 +4160,7 @@ - (void)testSendClusterTest_TC_CC_6_000008_Off XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster off:^(NSError * err, NSDictionary * values) { @@ -4135,7 +4177,7 @@ - (void)testSendClusterTest_TC_CC_6_000009_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4154,7 +4196,7 @@ - (void)testSendClusterTest_TC_CC_7_000000_On XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster on:^(NSError * err, NSDictionary * values) { @@ -4171,7 +4213,7 @@ - (void)testSendClusterTest_TC_CC_7_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4189,7 +4231,7 @@ - (void)testSendClusterTest_TC_CC_7_000002_EnhancedMoveToHue XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move To Hue command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t enhancedHueArgument = 1025U; @@ -4217,7 +4259,7 @@ - (void)testSendClusterTest_TC_CC_7_000003_ReadAttribute [self expectationWithDescription:@"Check Remaining time attribute value matched the value sent by the last command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeRemainingTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4235,7 +4277,7 @@ - (void)testSendClusterTest_TC_CC_7_000004_EnhancedMoveHue XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Down command "]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 3; @@ -4260,7 +4302,7 @@ - (void)testSendClusterTest_TC_CC_7_000005_EnhancedMoveHue XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Stop command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 0; @@ -4285,7 +4327,7 @@ - (void)testSendClusterTest_TC_CC_7_000006_EnhancedMoveHue XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Up command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 1; @@ -4310,7 +4352,7 @@ - (void)testSendClusterTest_TC_CC_7_000007_EnhancedMoveHue XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Stop command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t moveModeArgument = 0; @@ -4335,7 +4377,7 @@ - (void)testSendClusterTest_TC_CC_7_000008_EnhancedStepHue XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Step Hue Up command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t stepModeArgument = 0; @@ -4362,7 +4404,7 @@ - (void)testSendClusterTest_TC_CC_7_000009_EnhancedStepHue XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Step Hue Down command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t stepModeArgument = 1; @@ -4389,7 +4431,7 @@ - (void)testSendClusterTest_TC_CC_7_000010_EnhancedMoveToHueAndSaturation XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced move to hue and saturation command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint16_t enhancedHueArgument = 1200U; @@ -4416,7 +4458,7 @@ - (void)testSendClusterTest_TC_CC_7_000011_Off XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster off:^(NSError * err, NSDictionary * values) { @@ -4433,7 +4475,7 @@ - (void)testSendClusterTest_TC_CC_7_000012_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4452,7 +4494,7 @@ - (void)testSendClusterTest_TC_CC_8_000000_On XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster on:^(NSError * err, NSDictionary * values) { @@ -4469,7 +4511,7 @@ - (void)testSendClusterTest_TC_CC_8_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4487,7 +4529,7 @@ - (void)testSendClusterTest_TC_CC_8_000002_ColorLoopSet XCTestExpectation * expectation = [self expectationWithDescription:@"Color Loop Set Command - Set all Attributs"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t updateFlagsArgument = 14; @@ -4518,7 +4560,7 @@ - (void)testSendClusterTest_TC_CC_8_000003_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopDirection Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4536,7 +4578,7 @@ - (void)testSendClusterTest_TC_CC_8_000004_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopTime Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeColorLoopTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4554,7 +4596,7 @@ - (void)testSendClusterTest_TC_CC_8_000005_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopStartEnhancedHue Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeColorLoopStartEnhancedHueWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4572,7 +4614,7 @@ - (void)testSendClusterTest_TC_CC_8_000006_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopActive Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeColorLoopActiveWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4590,7 +4632,7 @@ - (void)testSendClusterTest_TC_CC_8_000007_ColorLoopSet XCTestExpectation * expectation = [self expectationWithDescription:@"Color Loop Set Command - Start Color Loop"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t updateFlagsArgument = 1; @@ -4621,7 +4663,7 @@ - (void)testSendClusterTest_TC_CC_8_000008_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopActive Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeColorLoopActiveWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4640,7 +4682,7 @@ - (void)testSendClusterTest_TC_CC_8_000009_ColorLoopSet [self expectationWithDescription:@"Color Loop Set Command - Set direction and time while running"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t updateFlagsArgument = 6; @@ -4671,7 +4713,7 @@ - (void)testSendClusterTest_TC_CC_8_000010_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopDirection Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4689,7 +4731,7 @@ - (void)testSendClusterTest_TC_CC_8_000011_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopTime Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeColorLoopTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4707,7 +4749,7 @@ - (void)testSendClusterTest_TC_CC_8_000012_ColorLoopSet XCTestExpectation * expectation = [self expectationWithDescription:@"Color Loop Set Command - Set direction while running"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t updateFlagsArgument = 2; @@ -4738,7 +4780,7 @@ - (void)testSendClusterTest_TC_CC_8_000013_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopDirection Value"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4756,7 +4798,7 @@ - (void)testSendClusterTest_TC_CC_8_000014_Off XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster off:^(NSError * err, NSDictionary * values) { @@ -4773,7 +4815,7 @@ - (void)testSendClusterTest_TC_CC_8_000015_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4792,7 +4834,7 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000000_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4805,12 +4847,33 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000000_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_WNCV_1_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_WNCV_1_1_000001_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default value to mandatory global attribute: ClusterRevision"]; + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint16_t clusterRevisionArgument = 2U; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write the default value to mandatory global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_WNCV_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4829,7 +4892,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000000_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read the RO mandatory attribute default: Type"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeTypeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4847,7 +4910,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"reads back the RO mandatory attribute: Type"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeTypeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4865,7 +4928,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000002_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read the RO mandatory attribute default: ConfigStatus"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeConfigStatusWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4883,7 +4946,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000003_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"reads back the RO mandatory attribute: ConfigStatus"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeConfigStatusWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4902,7 +4965,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000004_ReadAttribute [self expectationWithDescription:@"read the RO mandatory attribute default: OperationalStatus"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOperationalStatusWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4920,7 +4983,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000005_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"reads back the RO mandatory attribute: OperationalStatus"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeOperationalStatusWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4938,7 +5001,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000006_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read the RO mandatory attribute default: EndProductType"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeEndProductTypeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4956,7 +5019,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000007_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"reads back the RO mandatory attribute: EndProductType"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeEndProductTypeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4974,7 +5037,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000008_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read the RW mandatory attribute default: Mode"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeModeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -4992,7 +5055,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000009_WriteAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"write a value into the RW mandatory attribute:: Mode"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); uint8_t modeArgument = 7; @@ -5011,7 +5074,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000010_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"reads back the RW mandatory attribute: Mode"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeModeWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -5030,7 +5093,7 @@ - (void)testSendClusterTest_TC_BI_1_1_000000_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -5043,12 +5106,33 @@ - (void)testSendClusterTest_TC_BI_1_1_000000_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_BI_1_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_BI_1_1_000001_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint16_t clusterRevisionArgument = 1U; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_BI_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -5067,7 +5151,9 @@ - (void)testSendClusterTest_TC_TM_1_1_000000_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTemperatureMeasurement * cluster = [[CHIPTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -5085,7 +5171,9 @@ - (void)testSendClusterTest_TC_TM_1_1_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTemperatureMeasurement * cluster = [[CHIPTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -5104,7 +5192,7 @@ - (void)testSendClusterTest_TC_OCC_1_1_000000_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOccupancySensing * cluster = [[CHIPOccupancySensing alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -5122,7 +5210,7 @@ - (void)testSendClusterTest_TC_OCC_1_1_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOccupancySensing * cluster = [[CHIPOccupancySensing alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -5141,7 +5229,9 @@ - (void)testSendClusterOperationalCredentialsCluster_000000_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read number of supported fabrics"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOperationalCredentials * cluster = [[CHIPOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeSupportedFabricsWithResponseHandler:^(NSError * err, NSDictionary * values) { @@ -5159,7 +5249,9 @@ - (void)testSendClusterOperationalCredentialsCluster_000001_ReadAttribute XCTestExpectation * expectation = [self expectationWithDescription:@"Read number of commissioned fabrics"]; CHIPDevice * device = GetPairedDevice(kDeviceId); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPOperationalCredentials * cluster = [[CHIPOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeCommissionedFabricsWithResponseHandler:^(NSError * err, NSDictionary * values) { diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 49b3dc97b2b81f..82d2fe8072fe9b 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -80,7 +80,7 @@ class TV_TargetNavigatorCluster : public TestCommand { ChipLogProgress(chipTool, "Target Navigator - Read attribute Target Navigator list: Sending command..."); - chip::Controller::TargetNavigatorCluster cluster; + chip::Controller::TargetNavigatorClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -145,7 +145,7 @@ class TV_TargetNavigatorCluster : public TestCommand { ChipLogProgress(chipTool, "Target Navigator - Navigate Target Command: Sending command..."); - chip::Controller::TargetNavigatorCluster cluster; + chip::Controller::TargetNavigatorClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -253,7 +253,7 @@ class TV_AudioOutputCluster : public TestCommand { ChipLogProgress(chipTool, "Audio Output - Read attribute Audio Output list: Sending command..."); - chip::Controller::AudioOutputCluster cluster; + chip::Controller::AudioOutputClusterTest cluster; cluster.Associate(mDevice, 2); CHIP_ERROR err = CHIP_NO_ERROR; @@ -317,7 +317,7 @@ class TV_AudioOutputCluster : public TestCommand { ChipLogProgress(chipTool, "Audio Output - Select Output Command: Sending command..."); - chip::Controller::AudioOutputCluster cluster; + chip::Controller::AudioOutputClusterTest cluster; cluster.Associate(mDevice, 2); CHIP_ERROR err = CHIP_NO_ERROR; @@ -374,7 +374,7 @@ class TV_AudioOutputCluster : public TestCommand { ChipLogProgress(chipTool, "Audio Output - Rename Output Command: Sending command..."); - chip::Controller::AudioOutputCluster cluster; + chip::Controller::AudioOutputClusterTest cluster; cluster.Associate(mDevice, 2); CHIP_ERROR err = CHIP_NO_ERROR; @@ -484,7 +484,7 @@ class TV_ApplicationLauncherCluster : public TestCommand { ChipLogProgress(chipTool, "Application Launcher - Read attribute Application Launcher list: Sending command..."); - chip::Controller::ApplicationLauncherCluster cluster; + chip::Controller::ApplicationLauncherClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -548,7 +548,7 @@ class TV_ApplicationLauncherCluster : public TestCommand { ChipLogProgress(chipTool, "Application Launcher - Launch App Command: Sending command..."); - chip::Controller::ApplicationLauncherCluster cluster; + chip::Controller::ApplicationLauncherClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -609,7 +609,7 @@ class TV_ApplicationLauncherCluster : public TestCommand { ChipLogProgress(chipTool, "Application Launcher - Read attribute catalog vendor id: Sending command..."); - chip::Controller::ApplicationLauncherCluster cluster; + chip::Controller::ApplicationLauncherClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -672,7 +672,7 @@ class TV_ApplicationLauncherCluster : public TestCommand { ChipLogProgress(chipTool, "Application Launcher - Read attribute application id: Sending command..."); - chip::Controller::ApplicationLauncherCluster cluster; + chip::Controller::ApplicationLauncherClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -777,7 +777,7 @@ class TV_KeypadInputCluster : public TestCommand { ChipLogProgress(chipTool, "Keypad Input - Send Key Command: Sending command..."); - chip::Controller::KeypadInputCluster cluster; + chip::Controller::KeypadInputClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -880,7 +880,7 @@ class TV_AccountLoginCluster : public TestCommand { ChipLogProgress(chipTool, "Account Login - Get Setup PIN Command: Sending command..."); - chip::Controller::AccountLoginCluster cluster; + chip::Controller::AccountLoginClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -936,7 +936,7 @@ class TV_AccountLoginCluster : public TestCommand { ChipLogProgress(chipTool, "Account Login - Login Command: Sending command..."); - chip::Controller::AccountLoginCluster cluster; + chip::Controller::AccountLoginClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1038,7 +1038,7 @@ class TV_WakeOnLanCluster : public TestCommand { ChipLogProgress(chipTool, "Wake on LAN - Read mac address: Sending command..."); - chip::Controller::WakeOnLanCluster cluster; + chip::Controller::WakeOnLanClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1155,7 +1155,7 @@ class TV_ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Change Status Command: Sending command..."); - chip::Controller::ApplicationBasicCluster cluster; + chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1212,7 +1212,7 @@ class TV_ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute vendor id: Sending command..."); - chip::Controller::ApplicationBasicCluster cluster; + chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1275,7 +1275,7 @@ class TV_ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute product id: Sending command..."); - chip::Controller::ApplicationBasicCluster cluster; + chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1338,7 +1338,7 @@ class TV_ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute catalog vendor id: Sending command..."); - chip::Controller::ApplicationBasicCluster cluster; + chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1474,7 +1474,7 @@ class TV_MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Play Command: Sending command..."); - chip::Controller::MediaPlaybackCluster cluster; + chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1537,7 +1537,7 @@ class TV_MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Pause Command: Sending command..."); - chip::Controller::MediaPlaybackCluster cluster; + chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1600,7 +1600,7 @@ class TV_MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Stop Command: Sending command..."); - chip::Controller::MediaPlaybackCluster cluster; + chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1663,7 +1663,7 @@ class TV_MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Start Over Command: Sending command..."); - chip::Controller::MediaPlaybackCluster cluster; + chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1726,7 +1726,7 @@ class TV_MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Previous Command: Sending command..."); - chip::Controller::MediaPlaybackCluster cluster; + chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1789,7 +1789,7 @@ class TV_MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Next Command: Sending command..."); - chip::Controller::MediaPlaybackCluster cluster; + chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1852,7 +1852,7 @@ class TV_MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Rewind Command: Sending command..."); - chip::Controller::MediaPlaybackCluster cluster; + chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1915,7 +1915,7 @@ class TV_MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Fast Forward Command: Sending command..."); - chip::Controller::MediaPlaybackCluster cluster; + chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -1978,7 +1978,7 @@ class TV_MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Skip Forward Command: Sending command..."); - chip::Controller::MediaPlaybackCluster cluster; + chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2043,7 +2043,7 @@ class TV_MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Skip Backward Command: Sending command..."); - chip::Controller::MediaPlaybackCluster cluster; + chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2109,7 +2109,7 @@ class TV_MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Seek Command: Sending command..."); - chip::Controller::MediaPlaybackCluster cluster; + chip::Controller::MediaPlaybackClusterTest cluster; cluster.Associate(mDevice, 3); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2222,7 +2222,7 @@ class TV_TvChannelCluster : public TestCommand { ChipLogProgress(chipTool, "TV Channel - Read attribute TV Channel list: Sending command..."); - chip::Controller::TvChannelCluster cluster; + chip::Controller::TvChannelClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2286,7 +2286,7 @@ class TV_TvChannelCluster : public TestCommand { ChipLogProgress(chipTool, "TV Channel - Change Channel By Number Command: Sending command..."); - chip::Controller::TvChannelCluster cluster; + chip::Controller::TvChannelClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2345,7 +2345,7 @@ class TV_TvChannelCluster : public TestCommand { ChipLogProgress(chipTool, "TV Channel - Skip Channel Command: Sending command..."); - chip::Controller::TvChannelCluster cluster; + chip::Controller::TvChannelClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2443,7 +2443,7 @@ class TV_LowPowerCluster : public TestCommand { ChipLogProgress(chipTool, "Low Power - Sleep Input Status Command: Sending command..."); - chip::Controller::LowPowerCluster cluster; + chip::Controller::LowPowerClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2557,7 +2557,7 @@ class TV_MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Read attribute media input list: Sending command..."); - chip::Controller::MediaInputCluster cluster; + chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2621,7 +2621,7 @@ class TV_MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Select Input Command: Sending command..."); - chip::Controller::MediaInputCluster cluster; + chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2678,7 +2678,7 @@ class TV_MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Read current input list: Sending command..."); - chip::Controller::MediaInputCluster cluster; + chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2741,7 +2741,7 @@ class TV_MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Hide Input Status Command: Sending command..."); - chip::Controller::MediaInputCluster cluster; + chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2797,7 +2797,7 @@ class TV_MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Show Input Status Command: Sending command..."); - chip::Controller::MediaInputCluster cluster; + chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -2853,7 +2853,7 @@ class TV_MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Rename Input Command: Sending command..."); - chip::Controller::MediaInputCluster cluster; + chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3286,7 +3286,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Send Test Command: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3342,7 +3342,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Send Test Not Handled Command: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3398,7 +3398,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Send Test Specific Command: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3461,7 +3461,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Send Test Add Arguments Command: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3526,7 +3526,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Send failing Test Add Arguments Command: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3584,7 +3584,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BOOLEAN Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3647,7 +3647,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute BOOLEAN True: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3704,7 +3704,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BOOLEAN True: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3767,7 +3767,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute BOOLEAN False: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3824,7 +3824,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BOOLEAN False: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3887,7 +3887,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP8 Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -3950,7 +3950,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute BITMAP8 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4007,7 +4007,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP8 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4070,7 +4070,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute BITMAP8 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4127,7 +4127,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP8 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4190,7 +4190,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP16 Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4253,7 +4253,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute BITMAP16 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4310,7 +4310,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP16 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4373,7 +4373,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute BITMAP16 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4430,7 +4430,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP16 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4493,7 +4493,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP32 Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4556,7 +4556,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute BITMAP32 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4613,7 +4613,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP32 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4676,7 +4676,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute BITMAP32 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4733,7 +4733,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP32 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4796,7 +4796,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP64 Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4859,7 +4859,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute BITMAP64 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4916,7 +4916,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP64 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -4979,7 +4979,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute BITMAP64 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5036,7 +5036,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute BITMAP64 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5099,7 +5099,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT8U Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5162,7 +5162,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT8U Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5219,7 +5219,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT8U Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5282,7 +5282,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT8U Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5339,7 +5339,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT8U Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5402,7 +5402,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT16U Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5465,7 +5465,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT16U Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5522,7 +5522,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT16U Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5585,7 +5585,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT16U Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5642,7 +5642,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT16U Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5705,7 +5705,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT32U Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5768,7 +5768,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT32U Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5825,7 +5825,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT32U Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5888,7 +5888,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT32U Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -5945,7 +5945,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT32U Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6008,7 +6008,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT64U Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6071,7 +6071,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT64U Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6128,7 +6128,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT64U Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6191,7 +6191,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT64U Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6248,7 +6248,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT64U Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6311,7 +6311,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT8S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6374,7 +6374,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT8S Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6431,7 +6431,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT8S Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6494,7 +6494,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT8S Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6551,7 +6551,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT8S Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6614,7 +6614,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT8S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6671,7 +6671,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT8S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6734,7 +6734,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT16S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6797,7 +6797,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT16S Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6854,7 +6854,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT16S Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6917,7 +6917,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT16S Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -6974,7 +6974,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT16S Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7037,7 +7037,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT16S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7094,7 +7094,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT16S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7157,7 +7157,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT32S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7220,7 +7220,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT32S Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7277,7 +7277,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT32S Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7340,7 +7340,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT32S Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7397,7 +7397,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT32S Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7460,7 +7460,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT32S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7517,7 +7517,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT32S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7580,7 +7580,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT64S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7643,7 +7643,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT64S Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7700,7 +7700,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT64S Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7763,7 +7763,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT64S Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7820,7 +7820,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT64S Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7883,7 +7883,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute INT64S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -7940,7 +7940,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute INT64S Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8003,7 +8003,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute ENUM8 Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8066,7 +8066,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute ENUM8 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8123,7 +8123,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute ENUM8 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8186,7 +8186,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute ENUM8 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8243,7 +8243,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute ENUM8 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8306,7 +8306,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute ENUM16 Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8369,7 +8369,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute ENUM16 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8426,7 +8426,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute ENUM16 Max Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8489,7 +8489,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute ENUM16 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8546,7 +8546,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute ENUM16 Min Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8609,7 +8609,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute OCTET_STRING Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8673,7 +8673,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute OCTET_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8731,7 +8731,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute OCTET_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8795,7 +8795,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute OCTET_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8854,7 +8854,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute OCTET_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8918,7 +8918,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute OCTET_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -8976,7 +8976,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute LONG_OCTET_STRING Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9040,7 +9040,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute LONG_OCTET_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9105,7 +9105,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute LONG_OCTET_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9179,7 +9179,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute LONG_OCTET_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9237,7 +9237,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute CHAR_STRING Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9301,7 +9301,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute CHAR_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9358,7 +9358,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute CHAR_STRING - Value too long: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9417,7 +9417,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute CHAR_STRING - Empty: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9475,7 +9475,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute LONG_CHAR_STRING Default Value: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9539,7 +9539,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute LONG_CHAR_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9604,7 +9604,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute LONG_CHAR_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9678,7 +9678,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Write attribute LONG_CHAR_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9736,7 +9736,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute LIST: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9800,7 +9800,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute LIST_OCTET_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9864,7 +9864,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute LIST_STRUCT_OCTET_STRING: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9929,7 +9929,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Read attribute UNSUPPORTED: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -9998,7 +9998,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Writeattribute UNSUPPORTED: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -10062,7 +10062,7 @@ class TestCluster : public TestCommand { ChipLogProgress(chipTool, "Test Cluster - Send Test Command to unsupported endpoint: Sending command..."); - chip::Controller::TestClusterCluster cluster; + chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 200); CHIP_ERROR err = CHIP_NO_ERROR; @@ -10181,7 +10181,7 @@ class Test_TC_OO_1_1 : public TestCommand err = TestSendClusterOnOffCommandReadAttribute_0(); break; case 1: - err = TestSendClusterOnOffCommandReadAttribute_1(); + err = TestSendClusterOnOffCommandWriteAttribute_1(); break; case 2: err = TestSendClusterOnOffCommandReadAttribute_2(); @@ -10189,6 +10189,12 @@ class Test_TC_OO_1_1 : public TestCommand case 3: err = TestSendClusterOnOffCommandReadAttribute_3(); break; + case 4: + err = TestSendClusterOnOffCommandWriteAttribute_4(); + break; + case 5: + err = TestSendClusterOnOffCommandReadAttribute_5(); + break; } if (CHIP_NO_ERROR != err) @@ -10200,7 +10206,7 @@ class Test_TC_OO_1_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 6; // // Tests methods @@ -10219,7 +10225,7 @@ class Test_TC_OO_1_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - read the global attribute: ClusterRevision: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -10268,32 +10274,36 @@ class Test_TC_OO_1_1 : public TestCommand runner->NextTest(); } - // Test reads back global attribute: ClusterRevision + // Test write the default values to mandatory global attribute: ClusterRevision using SuccessCallback_1 = void (*)(void * context, uint16_t clusterRevision); - chip::Callback::Callback mOnSuccessCallback_1{ OnTestSendClusterOnOffCommandReadAttribute_1_SuccessResponse, + chip::Callback::Callback mOnSuccessCallback_1{ OnTestSendClusterOnOffCommandWriteAttribute_1_SuccessResponse, this }; chip::Callback::Callback mOnFailureCallback_1{ - OnTestSendClusterOnOffCommandReadAttribute_1_FailureResponse, this + OnTestSendClusterOnOffCommandWriteAttribute_1_FailureResponse, this }; - bool mIsFailureExpected_1 = 0; + bool mIsFailureExpected_1 = 1; - CHIP_ERROR TestSendClusterOnOffCommandReadAttribute_1() + CHIP_ERROR TestSendClusterOnOffCommandWriteAttribute_1() { - ChipLogProgress(chipTool, "On/Off - reads back global attribute: ClusterRevision: Sending command..."); + ChipLogProgress(chipTool, + "On/Off - write the default values to mandatory global attribute: ClusterRevision: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; - err = cluster.ReadAttributeClusterRevision(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel()); + uint16_t clusterRevisionArgument = 3U; + err = cluster.WriteAttributeClusterRevision(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel(), + clusterRevisionArgument); return err; } - static void OnTestSendClusterOnOffCommandReadAttribute_1_FailureResponse(void * context, uint8_t status) + static void OnTestSendClusterOnOffCommandWriteAttribute_1_FailureResponse(void * context, uint8_t status) { - ChipLogProgress(chipTool, "On/Off - reads back global attribute: ClusterRevision: Failure Response"); + ChipLogProgress(chipTool, + "On/Off - write the default values to mandatory global attribute: ClusterRevision: Failure Response"); Test_TC_OO_1_1 * runner = reinterpret_cast(context); @@ -10307,9 +10317,10 @@ class Test_TC_OO_1_1 : public TestCommand runner->NextTest(); } - static void OnTestSendClusterOnOffCommandReadAttribute_1_SuccessResponse(void * context, uint16_t clusterRevision) + static void OnTestSendClusterOnOffCommandWriteAttribute_1_SuccessResponse(void * context, uint16_t clusterRevision) { - ChipLogProgress(chipTool, "On/Off - reads back global attribute: ClusterRevision: Success Response"); + ChipLogProgress(chipTool, + "On/Off - write the default values to mandatory global attribute: ClusterRevision: Success Response"); Test_TC_OO_1_1 * runner = reinterpret_cast(context); @@ -10320,18 +10331,11 @@ class Test_TC_OO_1_1 : public TestCommand return; } - if (clusterRevision != 3U) - { - ChipLogError(chipTool, "Error: Value mismatch. Expected: '%s'", "3"); - runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); - return; - } - runner->NextTest(); } - // Test read the optional global attribute: FeatureMap - using SuccessCallback_2 = void (*)(void * context, uint32_t featureMap); + // Test reads back global attribute: ClusterRevision + using SuccessCallback_2 = void (*)(void * context, uint16_t clusterRevision); chip::Callback::Callback mOnSuccessCallback_2{ OnTestSendClusterOnOffCommandReadAttribute_2_SuccessResponse, this }; chip::Callback::Callback mOnFailureCallback_2{ @@ -10341,21 +10345,21 @@ class Test_TC_OO_1_1 : public TestCommand CHIP_ERROR TestSendClusterOnOffCommandReadAttribute_2() { - ChipLogProgress(chipTool, "On/Off - read the optional global attribute: FeatureMap: Sending command..."); + ChipLogProgress(chipTool, "On/Off - reads back global attribute: ClusterRevision: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; - err = cluster.ReadAttributeFeatureMap(mOnSuccessCallback_2.Cancel(), mOnFailureCallback_2.Cancel()); + err = cluster.ReadAttributeClusterRevision(mOnSuccessCallback_2.Cancel(), mOnFailureCallback_2.Cancel()); return err; } static void OnTestSendClusterOnOffCommandReadAttribute_2_FailureResponse(void * context, uint8_t status) { - ChipLogProgress(chipTool, "On/Off - read the optional global attribute: FeatureMap: Failure Response"); + ChipLogProgress(chipTool, "On/Off - reads back global attribute: ClusterRevision: Failure Response"); Test_TC_OO_1_1 * runner = reinterpret_cast(context); @@ -10369,9 +10373,9 @@ class Test_TC_OO_1_1 : public TestCommand runner->NextTest(); } - static void OnTestSendClusterOnOffCommandReadAttribute_2_SuccessResponse(void * context, uint32_t featureMap) + static void OnTestSendClusterOnOffCommandReadAttribute_2_SuccessResponse(void * context, uint16_t clusterRevision) { - ChipLogProgress(chipTool, "On/Off - read the optional global attribute: FeatureMap: Success Response"); + ChipLogProgress(chipTool, "On/Off - reads back global attribute: ClusterRevision: Success Response"); Test_TC_OO_1_1 * runner = reinterpret_cast(context); @@ -10382,9 +10386,9 @@ class Test_TC_OO_1_1 : public TestCommand return; } - if (featureMap != 0UL) + if (clusterRevision != 3U) { - ChipLogError(chipTool, "Error: Value mismatch. Expected: '%s'", "0"); + ChipLogError(chipTool, "Error: Value mismatch. Expected: '%s'", "3"); runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); return; } @@ -10392,7 +10396,7 @@ class Test_TC_OO_1_1 : public TestCommand runner->NextTest(); } - // Test reads back optional global attribute: FeatureMap + // Test read the optional global attribute: FeatureMap using SuccessCallback_3 = void (*)(void * context, uint32_t featureMap); chip::Callback::Callback mOnSuccessCallback_3{ OnTestSendClusterOnOffCommandReadAttribute_3_SuccessResponse, this }; @@ -10403,9 +10407,9 @@ class Test_TC_OO_1_1 : public TestCommand CHIP_ERROR TestSendClusterOnOffCommandReadAttribute_3() { - ChipLogProgress(chipTool, "On/Off - reads back optional global attribute: FeatureMap: Sending command..."); + ChipLogProgress(chipTool, "On/Off - read the optional global attribute: FeatureMap: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -10417,7 +10421,7 @@ class Test_TC_OO_1_1 : public TestCommand static void OnTestSendClusterOnOffCommandReadAttribute_3_FailureResponse(void * context, uint8_t status) { - ChipLogProgress(chipTool, "On/Off - reads back optional global attribute: FeatureMap: Failure Response"); + ChipLogProgress(chipTool, "On/Off - read the optional global attribute: FeatureMap: Failure Response"); Test_TC_OO_1_1 * runner = reinterpret_cast(context); @@ -10433,7 +10437,7 @@ class Test_TC_OO_1_1 : public TestCommand static void OnTestSendClusterOnOffCommandReadAttribute_3_SuccessResponse(void * context, uint32_t featureMap) { - ChipLogProgress(chipTool, "On/Off - reads back optional global attribute: FeatureMap: Success Response"); + ChipLogProgress(chipTool, "On/Off - read the optional global attribute: FeatureMap: Success Response"); Test_TC_OO_1_1 * runner = reinterpret_cast(context); @@ -10453,6 +10457,124 @@ class Test_TC_OO_1_1 : public TestCommand runner->NextTest(); } + + // Test write the default values to optional global attribute: FeatureMap + using SuccessCallback_4 = void (*)(void * context, uint32_t featureMap); + chip::Callback::Callback mOnSuccessCallback_4{ OnTestSendClusterOnOffCommandWriteAttribute_4_SuccessResponse, + this }; + chip::Callback::Callback mOnFailureCallback_4{ + OnTestSendClusterOnOffCommandWriteAttribute_4_FailureResponse, this + }; + bool mIsFailureExpected_4 = 1; + + CHIP_ERROR TestSendClusterOnOffCommandWriteAttribute_4() + { + ChipLogProgress(chipTool, "On/Off - write the default values to optional global attribute: FeatureMap: Sending command..."); + + chip::Controller::OnOffClusterTest cluster; + cluster.Associate(mDevice, 1); + + CHIP_ERROR err = CHIP_NO_ERROR; + + uint32_t featureMapArgument = 0UL; + err = cluster.WriteAttributeFeatureMap(mOnSuccessCallback_4.Cancel(), mOnFailureCallback_4.Cancel(), featureMapArgument); + + return err; + } + + static void OnTestSendClusterOnOffCommandWriteAttribute_4_FailureResponse(void * context, uint8_t status) + { + ChipLogProgress(chipTool, "On/Off - write the default values to optional global attribute: FeatureMap: Failure Response"); + + Test_TC_OO_1_1 * runner = reinterpret_cast(context); + + if (runner->mIsFailureExpected_4 == false) + { + ChipLogError(chipTool, "Error: The test was expecting a success callback. Got failure callback"); + runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); + return; + } + + runner->NextTest(); + } + + static void OnTestSendClusterOnOffCommandWriteAttribute_4_SuccessResponse(void * context, uint32_t featureMap) + { + ChipLogProgress(chipTool, "On/Off - write the default values to optional global attribute: FeatureMap: Success Response"); + + Test_TC_OO_1_1 * runner = reinterpret_cast(context); + + if (runner->mIsFailureExpected_4 == true) + { + ChipLogError(chipTool, "Error: The test was expecting a failure callback. Got success callback"); + runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); + return; + } + + runner->NextTest(); + } + + // Test reads back optional global attribute: FeatureMap + using SuccessCallback_5 = void (*)(void * context, uint32_t featureMap); + chip::Callback::Callback mOnSuccessCallback_5{ OnTestSendClusterOnOffCommandReadAttribute_5_SuccessResponse, + this }; + chip::Callback::Callback mOnFailureCallback_5{ + OnTestSendClusterOnOffCommandReadAttribute_5_FailureResponse, this + }; + bool mIsFailureExpected_5 = 0; + + CHIP_ERROR TestSendClusterOnOffCommandReadAttribute_5() + { + ChipLogProgress(chipTool, "On/Off - reads back optional global attribute: FeatureMap: Sending command..."); + + chip::Controller::OnOffClusterTest cluster; + cluster.Associate(mDevice, 1); + + CHIP_ERROR err = CHIP_NO_ERROR; + + err = cluster.ReadAttributeFeatureMap(mOnSuccessCallback_5.Cancel(), mOnFailureCallback_5.Cancel()); + + return err; + } + + static void OnTestSendClusterOnOffCommandReadAttribute_5_FailureResponse(void * context, uint8_t status) + { + ChipLogProgress(chipTool, "On/Off - reads back optional global attribute: FeatureMap: Failure Response"); + + Test_TC_OO_1_1 * runner = reinterpret_cast(context); + + if (runner->mIsFailureExpected_5 == false) + { + ChipLogError(chipTool, "Error: The test was expecting a success callback. Got failure callback"); + runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); + return; + } + + runner->NextTest(); + } + + static void OnTestSendClusterOnOffCommandReadAttribute_5_SuccessResponse(void * context, uint32_t featureMap) + { + ChipLogProgress(chipTool, "On/Off - reads back optional global attribute: FeatureMap: Success Response"); + + Test_TC_OO_1_1 * runner = reinterpret_cast(context); + + if (runner->mIsFailureExpected_5 == true) + { + ChipLogError(chipTool, "Error: The test was expecting a failure callback. Got success callback"); + runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); + return; + } + + if (featureMap != 0UL) + { + ChipLogError(chipTool, "Error: Value mismatch. Expected: '%s'", "0"); + runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); + return; + } + + runner->NextTest(); + } }; class Test_TC_OO_2_1 : public TestCommand @@ -10543,7 +10665,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - read the mandatory attribute: OnOff: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -10605,7 +10727,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - reads back mandatory attribute: OnOff: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -10667,7 +10789,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - read LT attribute: GlobalSceneControl: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -10729,7 +10851,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - read LT attribute: OnTime: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -10791,7 +10913,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - read LT attribute: OffWaitTime: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -10853,7 +10975,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - read LT attribute: StartUpOnOff: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -10915,7 +11037,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - write the default value to LT attribute: OnTime: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -10971,7 +11093,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - write the default value to LT attribute: OffWaitTime: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11027,7 +11149,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - write the default value to LT attribute: StartUpOnOff: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11084,7 +11206,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - reads back LT attribute: OnTime: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11147,7 +11269,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - reads back LT attribute: OffWaitTime: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11210,7 +11332,7 @@ class Test_TC_OO_2_1 : public TestCommand { ChipLogProgress(chipTool, "On/Off - reads back LT attribute: StartUpOnOff: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11352,7 +11474,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Send Off Command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11407,7 +11529,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is false after off command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11467,7 +11589,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Send On Command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11522,7 +11644,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is true after on command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11582,7 +11704,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Send Off Command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11637,7 +11759,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is false after off command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11697,7 +11819,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Send Toggle Command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11752,7 +11874,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is true after toggle command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11812,7 +11934,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Send Toggle Command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11867,7 +11989,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is false after toggle command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11927,7 +12049,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Send On Command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -11983,7 +12105,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is true after on command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12043,7 +12165,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Send Off Command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12099,7 +12221,7 @@ class Test_TC_OO_2_2 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is false after off command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12255,7 +12377,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query Interaction Model Version: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12313,7 +12435,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query Vendor Name: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12377,7 +12499,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query VendorID: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12434,7 +12556,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query Product Name: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12498,7 +12620,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query ProductID: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12555,7 +12677,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query User Label: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12619,7 +12741,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query User Location: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12686,7 +12808,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query HardwareVersion: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12743,7 +12865,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query HardwareVersionString: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12817,7 +12939,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query SoftwareVersion: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12875,7 +12997,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query SoftwareVersionString: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -12953,7 +13075,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query ManufacturingDate: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13034,7 +13156,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query PartNumber: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13105,7 +13227,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query ProductURL: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13178,7 +13300,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query ProductLabel: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13249,7 +13371,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query SerialNumber: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13320,7 +13442,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query LocalConfigDisabled: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13384,7 +13506,7 @@ class Test_TC_DM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Basic - Query Reachable: Sending command..."); - chip::Controller::BasicCluster cluster; + chip::Controller::BasicClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13585,7 +13707,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Turn on light for color control tests: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13640,7 +13762,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is true after on command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13703,7 +13825,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move to hue shortest distance command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13765,7 +13887,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move to hue longest distance command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13827,7 +13949,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move to hue up command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13889,7 +14011,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move to hue down command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -13950,7 +14072,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move hue up command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14010,7 +14132,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move hue stop command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14070,7 +14192,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move hue down command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14130,7 +14252,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move hue stop command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14191,7 +14313,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Step hue up command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14253,7 +14375,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Step hue down command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14315,7 +14437,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move to saturation command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14376,7 +14498,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move saturation up command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14437,7 +14559,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move saturation down command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14498,7 +14620,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Step saturation up command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14560,7 +14682,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Step saturation down command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14622,7 +14744,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move To current hue and saturation command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14682,7 +14804,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Turn off light that we turned on: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14738,7 +14860,7 @@ class Test_TC_CC_3_4 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is false after off command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14862,7 +14984,7 @@ class Test_TC_CC_5 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Turn on light for color control tests: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14917,7 +15039,7 @@ class Test_TC_CC_5 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is true after on command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -14980,7 +15102,7 @@ class Test_TC_CC_5 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move to Color command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15042,7 +15164,7 @@ class Test_TC_CC_5 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move Color command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15103,7 +15225,7 @@ class Test_TC_CC_5 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Stop Move Step command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15162,7 +15284,7 @@ class Test_TC_CC_5 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Step Color command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15221,7 +15343,7 @@ class Test_TC_CC_5 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Turn off light that we turned on: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15276,7 +15398,7 @@ class Test_TC_CC_5 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is false after off command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15406,7 +15528,7 @@ class Test_TC_CC_6 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Turn on light for color control tests: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15461,7 +15583,7 @@ class Test_TC_CC_6 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is true after on command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15524,7 +15646,7 @@ class Test_TC_CC_6 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move To Color Temperature command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15585,7 +15707,7 @@ class Test_TC_CC_6 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move up color temperature command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15649,7 +15771,7 @@ class Test_TC_CC_6 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Stop Color Temperature command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15713,7 +15835,7 @@ class Test_TC_CC_6 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Move down color temperature command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15777,7 +15899,7 @@ class Test_TC_CC_6 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Step up color temperature command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15842,7 +15964,7 @@ class Test_TC_CC_6 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Step down color temperature command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15904,7 +16026,7 @@ class Test_TC_CC_6 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Turn off light that we turned on: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -15959,7 +16081,7 @@ class Test_TC_CC_6 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is false after off command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16098,7 +16220,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Turn on light for color control tests: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16153,7 +16275,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is true after on command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16216,7 +16338,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Enhanced Move To Hue command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16280,7 +16402,7 @@ class Test_TC_CC_7 : public TestCommand chipTool, "Color Control - Check Remaining time attribute value matched the value sent by the last command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16347,7 +16469,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Enhanced Move Hue Down command : Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16408,7 +16530,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Enhanced Move Hue Stop command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16469,7 +16591,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Enhanced Move Hue Up command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16530,7 +16652,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Enhanced Move Hue Stop command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16591,7 +16713,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Enhanced Step Hue Up command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16653,7 +16775,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Enhanced Step Hue Down command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16715,7 +16837,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Enhanced move to hue and saturation command: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16776,7 +16898,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Turn off light that we turned on: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16832,7 +16954,7 @@ class Test_TC_CC_7 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is false after off command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -16980,7 +17102,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Turn on light for color control tests: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17035,7 +17157,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is true after on command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17098,7 +17220,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Color Loop Set Command - Set all Attributs: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17163,7 +17285,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Check ColorLoopDirection Value: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17226,7 +17348,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Check ColorLoopTime Value: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17289,7 +17411,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Check ColorLoopStartEnhancedHue Value: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17353,7 +17475,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Check ColorLoopActive Value: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17416,7 +17538,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Color Loop Set Command - Start Color Loop: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17481,7 +17603,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Check ColorLoopActive Value: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17545,7 +17667,7 @@ class Test_TC_CC_8 : public TestCommand ChipLogProgress(chipTool, "Color Control - Color Loop Set Command - Set direction and time while running: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17612,7 +17734,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Check ColorLoopDirection Value: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17675,7 +17797,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Check ColorLoopTime Value: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17738,7 +17860,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Color Loop Set Command - Set direction while running: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17803,7 +17925,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "Color Control - Check ColorLoopDirection Value: Sending command..."); - chip::Controller::ColorControlCluster cluster; + chip::Controller::ColorControlClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17863,7 +17985,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Turn off light that we turned on: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17919,7 +18041,7 @@ class Test_TC_CC_8 : public TestCommand { ChipLogProgress(chipTool, "On/Off - Check on/off attribute value is false after off command: Sending command..."); - chip::Controller::OnOffCluster cluster; + chip::Controller::OnOffClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -17995,7 +18117,10 @@ class Test_TC_WNCV_1_1 : public TestCommand err = TestSendClusterWindowCoveringCommandReadAttribute_0(); break; case 1: - err = TestSendClusterWindowCoveringCommandReadAttribute_1(); + err = TestSendClusterWindowCoveringCommandWriteAttribute_1(); + break; + case 2: + err = TestSendClusterWindowCoveringCommandReadAttribute_2(); break; } @@ -18008,7 +18133,7 @@ class Test_TC_WNCV_1_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 3; // // Tests methods @@ -18028,7 +18153,7 @@ class Test_TC_WNCV_1_1 : public TestCommand { ChipLogProgress(chipTool, "Window Covering - read the global attribute: ClusterRevision: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18077,37 +18202,99 @@ class Test_TC_WNCV_1_1 : public TestCommand runner->NextTest(); } - // Test reads back global attribute: ClusterRevision + // Test write the default value to mandatory global attribute: ClusterRevision using SuccessCallback_1 = void (*)(void * context, uint16_t clusterRevision); chip::Callback::Callback mOnSuccessCallback_1{ - OnTestSendClusterWindowCoveringCommandReadAttribute_1_SuccessResponse, this + OnTestSendClusterWindowCoveringCommandWriteAttribute_1_SuccessResponse, this }; chip::Callback::Callback mOnFailureCallback_1{ - OnTestSendClusterWindowCoveringCommandReadAttribute_1_FailureResponse, this + OnTestSendClusterWindowCoveringCommandWriteAttribute_1_FailureResponse, this }; - bool mIsFailureExpected_1 = 0; + bool mIsFailureExpected_1 = 1; - CHIP_ERROR TestSendClusterWindowCoveringCommandReadAttribute_1() + CHIP_ERROR TestSendClusterWindowCoveringCommandWriteAttribute_1() + { + ChipLogProgress( + chipTool, + "Window Covering - write the default value to mandatory global attribute: ClusterRevision: Sending command..."); + + chip::Controller::WindowCoveringClusterTest cluster; + cluster.Associate(mDevice, 1); + + CHIP_ERROR err = CHIP_NO_ERROR; + + uint16_t clusterRevisionArgument = 2U; + err = cluster.WriteAttributeClusterRevision(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel(), + clusterRevisionArgument); + + return err; + } + + static void OnTestSendClusterWindowCoveringCommandWriteAttribute_1_FailureResponse(void * context, uint8_t status) + { + ChipLogProgress( + chipTool, "Window Covering - write the default value to mandatory global attribute: ClusterRevision: Failure Response"); + + Test_TC_WNCV_1_1 * runner = reinterpret_cast(context); + + if (runner->mIsFailureExpected_1 == false) + { + ChipLogError(chipTool, "Error: The test was expecting a success callback. Got failure callback"); + runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); + return; + } + + runner->NextTest(); + } + + static void OnTestSendClusterWindowCoveringCommandWriteAttribute_1_SuccessResponse(void * context, uint16_t clusterRevision) + { + ChipLogProgress( + chipTool, "Window Covering - write the default value to mandatory global attribute: ClusterRevision: Success Response"); + + Test_TC_WNCV_1_1 * runner = reinterpret_cast(context); + + if (runner->mIsFailureExpected_1 == true) + { + ChipLogError(chipTool, "Error: The test was expecting a failure callback. Got success callback"); + runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); + return; + } + + runner->NextTest(); + } + + // Test reads back global attribute: ClusterRevision + using SuccessCallback_2 = void (*)(void * context, uint16_t clusterRevision); + chip::Callback::Callback mOnSuccessCallback_2{ + OnTestSendClusterWindowCoveringCommandReadAttribute_2_SuccessResponse, this + }; + chip::Callback::Callback mOnFailureCallback_2{ + OnTestSendClusterWindowCoveringCommandReadAttribute_2_FailureResponse, this + }; + bool mIsFailureExpected_2 = 0; + + CHIP_ERROR TestSendClusterWindowCoveringCommandReadAttribute_2() { ChipLogProgress(chipTool, "Window Covering - reads back global attribute: ClusterRevision: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; - err = cluster.ReadAttributeClusterRevision(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel()); + err = cluster.ReadAttributeClusterRevision(mOnSuccessCallback_2.Cancel(), mOnFailureCallback_2.Cancel()); return err; } - static void OnTestSendClusterWindowCoveringCommandReadAttribute_1_FailureResponse(void * context, uint8_t status) + static void OnTestSendClusterWindowCoveringCommandReadAttribute_2_FailureResponse(void * context, uint8_t status) { ChipLogProgress(chipTool, "Window Covering - reads back global attribute: ClusterRevision: Failure Response"); Test_TC_WNCV_1_1 * runner = reinterpret_cast(context); - if (runner->mIsFailureExpected_1 == false) + if (runner->mIsFailureExpected_2 == false) { ChipLogError(chipTool, "Error: The test was expecting a success callback. Got failure callback"); runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); @@ -18117,13 +18304,13 @@ class Test_TC_WNCV_1_1 : public TestCommand runner->NextTest(); } - static void OnTestSendClusterWindowCoveringCommandReadAttribute_1_SuccessResponse(void * context, uint16_t clusterRevision) + static void OnTestSendClusterWindowCoveringCommandReadAttribute_2_SuccessResponse(void * context, uint16_t clusterRevision) { ChipLogProgress(chipTool, "Window Covering - reads back global attribute: ClusterRevision: Success Response"); Test_TC_WNCV_1_1 * runner = reinterpret_cast(context); - if (runner->mIsFailureExpected_1 == true) + if (runner->mIsFailureExpected_2 == true) { ChipLogError(chipTool, "Error: The test was expecting a failure callback. Got success callback"); runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); @@ -18227,7 +18414,7 @@ class Test_TC_WNCV_2_1 : public TestCommand { ChipLogProgress(chipTool, "Window Covering - read the RO mandatory attribute default: Type: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18290,7 +18477,7 @@ class Test_TC_WNCV_2_1 : public TestCommand { ChipLogProgress(chipTool, "Window Covering - reads back the RO mandatory attribute: Type: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18353,7 +18540,7 @@ class Test_TC_WNCV_2_1 : public TestCommand { ChipLogProgress(chipTool, "Window Covering - read the RO mandatory attribute default: ConfigStatus: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18416,7 +18603,7 @@ class Test_TC_WNCV_2_1 : public TestCommand { ChipLogProgress(chipTool, "Window Covering - reads back the RO mandatory attribute: ConfigStatus: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18480,7 +18667,7 @@ class Test_TC_WNCV_2_1 : public TestCommand ChipLogProgress(chipTool, "Window Covering - read the RO mandatory attribute default: OperationalStatus: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18543,7 +18730,7 @@ class Test_TC_WNCV_2_1 : public TestCommand { ChipLogProgress(chipTool, "Window Covering - reads back the RO mandatory attribute: OperationalStatus: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18606,7 +18793,7 @@ class Test_TC_WNCV_2_1 : public TestCommand { ChipLogProgress(chipTool, "Window Covering - read the RO mandatory attribute default: EndProductType: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18669,7 +18856,7 @@ class Test_TC_WNCV_2_1 : public TestCommand { ChipLogProgress(chipTool, "Window Covering - reads back the RO mandatory attribute: EndProductType: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18732,7 +18919,7 @@ class Test_TC_WNCV_2_1 : public TestCommand { ChipLogProgress(chipTool, "Window Covering - read the RW mandatory attribute default: Mode: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18795,7 +18982,7 @@ class Test_TC_WNCV_2_1 : public TestCommand { ChipLogProgress(chipTool, "Window Covering - write a value into the RW mandatory attribute:: Mode: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18852,7 +19039,7 @@ class Test_TC_WNCV_2_1 : public TestCommand { ChipLogProgress(chipTool, "Window Covering - reads back the RW mandatory attribute: Mode: Sending command..."); - chip::Controller::WindowCoveringCluster cluster; + chip::Controller::WindowCoveringClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -18928,7 +19115,10 @@ class Test_TC_BI_1_1 : public TestCommand err = TestSendClusterBinaryInputBasicCommandReadAttribute_0(); break; case 1: - err = TestSendClusterBinaryInputBasicCommandReadAttribute_1(); + err = TestSendClusterBinaryInputBasicCommandWriteAttribute_1(); + break; + case 2: + err = TestSendClusterBinaryInputBasicCommandReadAttribute_2(); break; } @@ -18941,7 +19131,7 @@ class Test_TC_BI_1_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 3; // // Tests methods @@ -18961,7 +19151,7 @@ class Test_TC_BI_1_1 : public TestCommand { ChipLogProgress(chipTool, "Binary Input (Basic) - read the global attribute: ClusterRevision: Sending command..."); - chip::Controller::BinaryInputBasicCluster cluster; + chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -19010,37 +19200,101 @@ class Test_TC_BI_1_1 : public TestCommand runner->NextTest(); } - // Test reads back global attribute: ClusterRevision + // Test write the default values to mandatory global attribute: ClusterRevision using SuccessCallback_1 = void (*)(void * context, uint16_t clusterRevision); chip::Callback::Callback mOnSuccessCallback_1{ - OnTestSendClusterBinaryInputBasicCommandReadAttribute_1_SuccessResponse, this + OnTestSendClusterBinaryInputBasicCommandWriteAttribute_1_SuccessResponse, this }; chip::Callback::Callback mOnFailureCallback_1{ - OnTestSendClusterBinaryInputBasicCommandReadAttribute_1_FailureResponse, this + OnTestSendClusterBinaryInputBasicCommandWriteAttribute_1_FailureResponse, this }; - bool mIsFailureExpected_1 = 0; + bool mIsFailureExpected_1 = 1; + + CHIP_ERROR TestSendClusterBinaryInputBasicCommandWriteAttribute_1() + { + ChipLogProgress( + chipTool, + "Binary Input (Basic) - write the default values to mandatory global attribute: ClusterRevision: Sending command..."); + + chip::Controller::BinaryInputBasicClusterTest cluster; + cluster.Associate(mDevice, 1); + + CHIP_ERROR err = CHIP_NO_ERROR; + + uint16_t clusterRevisionArgument = 1U; + err = cluster.WriteAttributeClusterRevision(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel(), + clusterRevisionArgument); + + return err; + } - CHIP_ERROR TestSendClusterBinaryInputBasicCommandReadAttribute_1() + static void OnTestSendClusterBinaryInputBasicCommandWriteAttribute_1_FailureResponse(void * context, uint8_t status) + { + ChipLogProgress( + chipTool, + "Binary Input (Basic) - write the default values to mandatory global attribute: ClusterRevision: Failure Response"); + + Test_TC_BI_1_1 * runner = reinterpret_cast(context); + + if (runner->mIsFailureExpected_1 == false) + { + ChipLogError(chipTool, "Error: The test was expecting a success callback. Got failure callback"); + runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); + return; + } + + runner->NextTest(); + } + + static void OnTestSendClusterBinaryInputBasicCommandWriteAttribute_1_SuccessResponse(void * context, uint16_t clusterRevision) + { + ChipLogProgress( + chipTool, + "Binary Input (Basic) - write the default values to mandatory global attribute: ClusterRevision: Success Response"); + + Test_TC_BI_1_1 * runner = reinterpret_cast(context); + + if (runner->mIsFailureExpected_1 == true) + { + ChipLogError(chipTool, "Error: The test was expecting a failure callback. Got success callback"); + runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); + return; + } + + runner->NextTest(); + } + + // Test reads back global attribute: ClusterRevision + using SuccessCallback_2 = void (*)(void * context, uint16_t clusterRevision); + chip::Callback::Callback mOnSuccessCallback_2{ + OnTestSendClusterBinaryInputBasicCommandReadAttribute_2_SuccessResponse, this + }; + chip::Callback::Callback mOnFailureCallback_2{ + OnTestSendClusterBinaryInputBasicCommandReadAttribute_2_FailureResponse, this + }; + bool mIsFailureExpected_2 = 0; + + CHIP_ERROR TestSendClusterBinaryInputBasicCommandReadAttribute_2() { ChipLogProgress(chipTool, "Binary Input (Basic) - reads back global attribute: ClusterRevision: Sending command..."); - chip::Controller::BinaryInputBasicCluster cluster; + chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; - err = cluster.ReadAttributeClusterRevision(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel()); + err = cluster.ReadAttributeClusterRevision(mOnSuccessCallback_2.Cancel(), mOnFailureCallback_2.Cancel()); return err; } - static void OnTestSendClusterBinaryInputBasicCommandReadAttribute_1_FailureResponse(void * context, uint8_t status) + static void OnTestSendClusterBinaryInputBasicCommandReadAttribute_2_FailureResponse(void * context, uint8_t status) { ChipLogProgress(chipTool, "Binary Input (Basic) - reads back global attribute: ClusterRevision: Failure Response"); Test_TC_BI_1_1 * runner = reinterpret_cast(context); - if (runner->mIsFailureExpected_1 == false) + if (runner->mIsFailureExpected_2 == false) { ChipLogError(chipTool, "Error: The test was expecting a success callback. Got failure callback"); runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); @@ -19050,13 +19304,13 @@ class Test_TC_BI_1_1 : public TestCommand runner->NextTest(); } - static void OnTestSendClusterBinaryInputBasicCommandReadAttribute_1_SuccessResponse(void * context, uint16_t clusterRevision) + static void OnTestSendClusterBinaryInputBasicCommandReadAttribute_2_SuccessResponse(void * context, uint16_t clusterRevision) { ChipLogProgress(chipTool, "Binary Input (Basic) - reads back global attribute: ClusterRevision: Success Response"); Test_TC_BI_1_1 * runner = reinterpret_cast(context); - if (runner->mIsFailureExpected_1 == true) + if (runner->mIsFailureExpected_2 == true) { ChipLogError(chipTool, "Error: The test was expecting a failure callback. Got success callback"); runner->SetCommandExitStatus(CHIP_ERROR_INTERNAL); @@ -19173,7 +19427,7 @@ class Test_TC_TM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Temperature Measurement - read the global attribute: ClusterRevision: Sending command..."); - chip::Controller::TemperatureMeasurementCluster cluster; + chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -19237,7 +19491,7 @@ class Test_TC_TM_1_1 : public TestCommand { ChipLogProgress(chipTool, "Temperature Measurement - reads back global attribute: ClusterRevision: Sending command..."); - chip::Controller::TemperatureMeasurementCluster cluster; + chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -19347,7 +19601,7 @@ class Test_TC_OCC_1_1 : public TestCommand { ChipLogProgress(chipTool, "Occupancy Sensing - read the global attribute: ClusterRevision: Sending command..."); - chip::Controller::OccupancySensingCluster cluster; + chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -19410,7 +19664,7 @@ class Test_TC_OCC_1_1 : public TestCommand { ChipLogProgress(chipTool, "Occupancy Sensing - reads back global attribute: ClusterRevision: Sending command..."); - chip::Controller::OccupancySensingCluster cluster; + chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevice, 1); CHIP_ERROR err = CHIP_NO_ERROR; @@ -19519,7 +19773,7 @@ class OperationalCredentialsCluster : public TestCommand { ChipLogProgress(chipTool, "Operational Credentials - Read number of supported fabrics: Sending command..."); - chip::Controller::OperationalCredentialsCluster cluster; + chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; @@ -19585,7 +19839,7 @@ class OperationalCredentialsCluster : public TestCommand { ChipLogProgress(chipTool, "Operational Credentials - Read number of commissioned fabrics: Sending command..."); - chip::Controller::OperationalCredentialsCluster cluster; + chip::Controller::OperationalCredentialsClusterTest cluster; cluster.Associate(mDevice, 0); CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClusters.cpp new file mode 100644 index 00000000000000..827299801809e0 --- /dev/null +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClusters.cpp @@ -0,0 +1,4987 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#include "CHIPClusters.h" + +#include +#include + +#include +#include + +using namespace chip::app::Clusters; +using namespace chip::System; +using namespace chip::Encoding::LittleEndian; + +namespace chip { +namespace Controller { + +CHIP_ERROR AccountLoginClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR AdministratorCommissioningClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan vendorName) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ApplicationBasic::Attributes::Ids::VendorName; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, vendorName)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeVendorId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t vendorId) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ApplicationBasic::Attributes::Ids::VendorId; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, vendorId)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeApplicationName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan applicationName) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ApplicationBasic::Attributes::Ids::ApplicationName; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, applicationName)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeProductId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t productId) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ApplicationBasic::Attributes::Ids::ProductId; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, productId)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeApplicationId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan applicationId) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ApplicationBasic::Attributes::Ids::ApplicationId; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, applicationId)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeCatalogVendorId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t catalogVendorId) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ApplicationBasic::Attributes::Ids::CatalogVendorId; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, catalogVendorId)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeApplicationStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t applicationStatus) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ApplicationBasic::Attributes::Ids::ApplicationStatus; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, applicationStatus)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationLauncherClusterTest::WriteAttributeCatalogVendorId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t catalogVendorId) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ApplicationLauncher::Attributes::Ids::CatalogVendorId; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, catalogVendorId)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationLauncherClusterTest::WriteAttributeApplicationId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t applicationId) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ApplicationLauncher::Attributes::Ids::ApplicationId; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, applicationId)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationLauncherClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR AudioOutputClusterTest::WriteAttributeCurrentAudioOutput(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t currentAudioOutput) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = AudioOutput::Attributes::Ids::CurrentAudioOutput; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentAudioOutput)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR AudioOutputClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierMovingState(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t barrierMovingState) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BarrierControl::Attributes::Ids::BarrierMovingState; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, barrierMovingState)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierSafetyStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t barrierSafetyStatus) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BarrierControl::Attributes::Ids::BarrierSafetyStatus; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, barrierSafetyStatus)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierCapabilities(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t barrierCapabilities) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BarrierControl::Attributes::Ids::BarrierCapabilities; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, barrierCapabilities)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierPosition(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t barrierPosition) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BarrierControl::Attributes::Ids::BarrierPosition; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, barrierPosition)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BarrierControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeInteractionModelVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t interactionModelVersion) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::InteractionModelVersion; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, interactionModelVersion)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan vendorName) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::VendorName; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, vendorName)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeVendorID(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t vendorID) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::VendorID; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, vendorID)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeProductName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan productName) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::ProductName; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, productName)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeProductID(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t productID) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::ProductID; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, productID)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t hardwareVersion) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::HardwareVersion; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, hardwareVersion)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan hardwareVersionString) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::HardwareVersionString; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, hardwareVersionString)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t softwareVersion) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::SoftwareVersion; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, softwareVersion)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan softwareVersionString) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::SoftwareVersionString; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, softwareVersionString)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan manufacturingDate) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::ManufacturingDate; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, manufacturingDate)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributePartNumber(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan partNumber) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::PartNumber; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, partNumber)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeProductURL(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan productURL) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::ProductURL; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, productURL)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeProductLabel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan productLabel) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::ProductLabel; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, productLabel)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan serialNumber) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::SerialNumber; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, serialNumber)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeReachable(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool reachable) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Basic::Attributes::Ids::Reachable; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, reachable)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BinaryInputBasicClusterTest::WriteAttributeStatusFlags(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t statusFlags) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BinaryInputBasic::Attributes::Ids::StatusFlags; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, statusFlags)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BinaryInputBasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BindingClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan vendorName) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::VendorName; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, vendorName)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeVendorID(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t vendorID) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::VendorID; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, vendorID)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeProductName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan productName) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::ProductName; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, productName)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t hardwareVersion) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::HardwareVersion; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, hardwareVersion)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan hardwareVersionString) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::HardwareVersionString; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, hardwareVersionString)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t softwareVersion) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::SoftwareVersion; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, softwareVersion)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan softwareVersionString) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::SoftwareVersionString; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, softwareVersionString)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan manufacturingDate) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::ManufacturingDate; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, manufacturingDate)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributePartNumber(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan partNumber) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::PartNumber; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, partNumber)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeProductURL(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan productURL) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::ProductURL; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, productURL)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeProductLabel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan productLabel) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::ProductLabel; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, productLabel)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan serialNumber) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::SerialNumber; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, serialNumber)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeReachable(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool reachable) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedDeviceBasic::Attributes::Ids::Reachable; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, reachable)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentHue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t currentHue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::CurrentHue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentHue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentSaturation(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t currentSaturation) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::CurrentSaturation; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentSaturation)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t remainingTime) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::RemainingTime; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, remainingTime)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentX(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t currentX) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::CurrentX; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentX)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentY(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t currentY) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::CurrentY; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentY)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeDriftCompensation(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t driftCompensation) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::DriftCompensation; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, driftCompensation)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeCompensationText(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan compensationText) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::CompensationText; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, compensationText)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorTemperature(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t colorTemperature) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::ColorTemperature; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, colorTemperature)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t colorMode) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::ColorMode; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, colorMode)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeNumberOfPrimaries(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t numberOfPrimaries) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::NumberOfPrimaries; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, numberOfPrimaries)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary1X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary1X) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary1X; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary1X)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary1Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary1Y) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary1Y; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary1Y)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary1Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t primary1Intensity) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary1Intensity; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary1Intensity)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary2X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary2X) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary2X; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary2X)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary2Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary2Y) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary2Y; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary2Y)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary2Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t primary2Intensity) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary2Intensity; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary2Intensity)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary3X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary3X) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary3X; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary3X)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary3Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary3Y) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary3Y; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary3Y)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary3Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t primary3Intensity) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary3Intensity; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary3Intensity)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary4X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary4X) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary4X; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary4X)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary4Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary4Y) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary4Y; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary4Y)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary4Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t primary4Intensity) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary4Intensity; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary4Intensity)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary5X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary5X) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary5X; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary5X)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary5Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary5Y) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary5Y; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary5Y)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary5Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t primary5Intensity) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary5Intensity; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary5Intensity)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary6X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary6X) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary6X; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary6X)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary6Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t primary6Y) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary6Y; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary6Y)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary6Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t primary6Intensity) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::Primary6Intensity; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, primary6Intensity)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeEnhancedCurrentHue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t enhancedCurrentHue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::EnhancedCurrentHue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, enhancedCurrentHue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeEnhancedColorMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t enhancedColorMode) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::EnhancedColorMode; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, enhancedColorMode)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopActive(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t colorLoopActive) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::ColorLoopActive; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, colorLoopActive)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopDirection(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t colorLoopDirection) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::ColorLoopDirection; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, colorLoopDirection)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t colorLoopTime) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::ColorLoopTime; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, colorLoopTime)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopStartEnhancedHue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t colorLoopStartEnhancedHue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::ColorLoopStartEnhancedHue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, colorLoopStartEnhancedHue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopStoredEnhancedHue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t colorLoopStoredEnhancedHue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::ColorLoopStoredEnhancedHue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, colorLoopStoredEnhancedHue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorCapabilities(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t colorCapabilities) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::ColorCapabilities; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, colorCapabilities)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorTempPhysicalMin(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t colorTempPhysicalMin) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::ColorTempPhysicalMin; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, colorTempPhysicalMin)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorTempPhysicalMax(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t colorTempPhysicalMax) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::ColorTempPhysicalMax; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, colorTempPhysicalMax)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeCoupleColorTempToLevelMinMireds(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t coupleColorTempToLevelMinMireds) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ColorControl::Attributes::Ids::CoupleColorTempToLevelMinMireds; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, coupleColorTempToLevelMinMireds)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ContentLauncherClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR DescriptorClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR DoorLockClusterTest::WriteAttributeLockState(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t lockState) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = DoorLock::Attributes::Ids::LockState; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, lockState)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR DoorLockClusterTest::WriteAttributeLockType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t lockType) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = DoorLock::Attributes::Ids::LockType; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, lockType)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR DoorLockClusterTest::WriteAttributeActuatorEnabled(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool actuatorEnabled) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = DoorLock::Attributes::Ids::ActuatorEnabled; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, actuatorEnabled)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR DoorLockClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeMeasurementType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t measurementType) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ElectricalMeasurement::Attributes::Ids::MeasurementType; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, measurementType)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeTotalActivePower(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int32_t totalActivePower) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ElectricalMeasurement::Attributes::Ids::TotalActivePower; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, totalActivePower)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsVoltage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t rmsVoltage) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ElectricalMeasurement::Attributes::Ids::RmsVoltage; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rmsVoltage)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsVoltageMin(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t rmsVoltageMin) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ElectricalMeasurement::Attributes::Ids::RmsVoltageMin; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rmsVoltageMin)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsVoltageMax(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t rmsVoltageMax) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ElectricalMeasurement::Attributes::Ids::RmsVoltageMax; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rmsVoltageMax)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsCurrent(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t rmsCurrent) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ElectricalMeasurement::Attributes::Ids::RmsCurrent; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rmsCurrent)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsCurrentMin(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t rmsCurrentMin) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ElectricalMeasurement::Attributes::Ids::RmsCurrentMin; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rmsCurrentMin)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsCurrentMax(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t rmsCurrentMax) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ElectricalMeasurement::Attributes::Ids::RmsCurrentMax; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rmsCurrentMax)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeActivePower(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t activePower) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ElectricalMeasurement::Attributes::Ids::ActivePower; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, activePower)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeActivePowerMin(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t activePowerMin) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ElectricalMeasurement::Attributes::Ids::ActivePowerMin; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, activePowerMin)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeActivePowerMax(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t activePowerMax) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ElectricalMeasurement::Attributes::Ids::ActivePowerMax; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, activePowerMax)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributePacketRxCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t packetRxCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = EthernetNetworkDiagnostics::Attributes::Ids::PacketRxCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, packetRxCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributePacketTxCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t packetTxCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = EthernetNetworkDiagnostics::Attributes::Ids::PacketTxCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, packetTxCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeTxErrCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t txErrCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = EthernetNetworkDiagnostics::Attributes::Ids::TxErrCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txErrCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeCollisionCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t collisionCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = EthernetNetworkDiagnostics::Attributes::Ids::CollisionCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, collisionCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t overrunCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = EthernetNetworkDiagnostics::Attributes::Ids::OverrunCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, overrunCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR FixedLabelClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t measuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = FlowMeasurement::Attributes::Ids::MeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, measuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t minMeasuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = FlowMeasurement::Attributes::Ids::MinMeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, minMeasuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t maxMeasuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = FlowMeasurement::Attributes::Ids::MaxMeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, maxMeasuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR GeneralCommissioningClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeRebootCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t rebootCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = GeneralDiagnostics::Attributes::Ids::RebootCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rebootCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR GroupKeyManagementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR GroupsClusterTest::WriteAttributeNameSupport(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t nameSupport) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Groups::Attributes::Ids::NameSupport; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, nameSupport)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR GroupsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR IdentifyClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR KeypadInputClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlClusterTest::WriteAttributeCurrentLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t currentLevel) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = LevelControl::Attributes::Ids::CurrentLevel; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentLevel)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LowPowerClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR MediaInputClusterTest::WriteAttributeCurrentMediaInput(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t currentMediaInput) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = MediaInput::Attributes::Ids::CurrentMediaInput; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentMediaInput)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR MediaInputClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR MediaPlaybackClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR NetworkCommissioningClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t featureMap) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::FeatureMap; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, featureMap)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR NetworkCommissioningClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OtaSoftwareUpdateProviderClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OccupancySensingClusterTest::WriteAttributeOccupancy(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t occupancy) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = OccupancySensing::Attributes::Ids::Occupancy; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, occupancy)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OccupancySensingClusterTest::WriteAttributeOccupancySensorType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t occupancySensorType) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = OccupancySensing::Attributes::Ids::OccupancySensorType; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, occupancySensorType)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OccupancySensingClusterTest::WriteAttributeOccupancySensorTypeBitmap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t occupancySensorTypeBitmap) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = OccupancySensing::Attributes::Ids::OccupancySensorTypeBitmap; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, occupancySensorTypeBitmap)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OccupancySensingClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OnOffClusterTest::WriteAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + bool onOff) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = OnOff::Attributes::Ids::OnOff; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, onOff)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OnOffClusterTest::WriteAttributeGlobalSceneControl(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool globalSceneControl) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = OnOff::Attributes::Ids::GlobalSceneControl; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, globalSceneControl)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OnOffClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t featureMap) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::FeatureMap; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, featureMap)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OnOffClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OnOffSwitchConfigurationClusterTest::WriteAttributeSwitchType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t switchType) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = OnOffSwitchConfiguration::Attributes::Ids::SwitchType; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, switchType)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OnOffSwitchConfigurationClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OperationalCredentialsClusterTest::WriteAttributeSupportedFabrics(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t supportedFabrics) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = OperationalCredentials::Attributes::Ids::SupportedFabrics; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, supportedFabrics)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OperationalCredentialsClusterTest::WriteAttributeCommissionedFabrics(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t commissionedFabrics) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = OperationalCredentials::Attributes::Ids::CommissionedFabrics; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, commissionedFabrics)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OperationalCredentialsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t measuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = PressureMeasurement::Attributes::Ids::MeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, measuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t minMeasuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = PressureMeasurement::Attributes::Ids::MinMeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, minMeasuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t maxMeasuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = PressureMeasurement::Attributes::Ids::MaxMeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, maxMeasuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxPressure(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t maxPressure) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = PumpConfigurationAndControl::Attributes::Ids::MaxPressure; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, maxPressure)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxSpeed(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t maxSpeed) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = PumpConfigurationAndControl::Attributes::Ids::MaxSpeed; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, maxSpeed)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxFlow(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t maxFlow) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = PumpConfigurationAndControl::Attributes::Ids::MaxFlow; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, maxFlow)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeEffectiveOperationMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t effectiveOperationMode) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = PumpConfigurationAndControl::Attributes::Ids::EffectiveOperationMode; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, effectiveOperationMode)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeEffectiveControlMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t effectiveControlMode) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = PumpConfigurationAndControl::Attributes::Ids::EffectiveControlMode; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, effectiveControlMode)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeCapacity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t capacity) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = PumpConfigurationAndControl::Attributes::Ids::Capacity; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, capacity)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t measuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = RelativeHumidityMeasurement::Attributes::Ids::MeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, measuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t minMeasuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = RelativeHumidityMeasurement::Attributes::Ids::MinMeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, minMeasuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t maxMeasuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = RelativeHumidityMeasurement::Attributes::Ids::MaxMeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, maxMeasuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ScenesClusterTest::WriteAttributeSceneCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t sceneCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Scenes::Attributes::Ids::SceneCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, sceneCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ScenesClusterTest::WriteAttributeCurrentScene(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t currentScene) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Scenes::Attributes::Ids::CurrentScene; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentScene)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ScenesClusterTest::WriteAttributeCurrentGroup(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t currentGroup) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Scenes::Attributes::Ids::CurrentGroup; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentGroup)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ScenesClusterTest::WriteAttributeSceneValid(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool sceneValid) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Scenes::Attributes::Ids::SceneValid; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, sceneValid)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ScenesClusterTest::WriteAttributeNameSupport(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t nameSupport) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Scenes::Attributes::Ids::NameSupport; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, nameSupport)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ScenesClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeCurrentHeapHighWatermark(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t currentHeapHighWatermark) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = SoftwareDiagnostics::Attributes::Ids::CurrentHeapHighWatermark; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentHeapHighWatermark)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR SwitchClusterTest::WriteAttributeNumberOfPositions(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t numberOfPositions) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Switch::Attributes::Ids::NumberOfPositions; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, numberOfPositions)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR SwitchClusterTest::WriteAttributeCurrentPosition(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t currentPosition) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Switch::Attributes::Ids::CurrentPosition; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentPosition)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR SwitchClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TvChannelClusterTest::WriteAttributeTvChannelLineup(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan tvChannelLineup) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = TvChannel::Attributes::Ids::TvChannelLineup; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, tvChannelLineup)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TvChannelClusterTest::WriteAttributeCurrentTvChannel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan currentTvChannel) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = TvChannel::Attributes::Ids::CurrentTvChannel; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentTvChannel)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TvChannelClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TargetNavigatorClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t measuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = TemperatureMeasurement::Attributes::Ids::MeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, measuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t minMeasuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = TemperatureMeasurement::Attributes::Ids::MinMeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, minMeasuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t maxMeasuredValue) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = TemperatureMeasurement::Attributes::Ids::MaxMeasuredValue; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, maxMeasuredValue)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatClusterTest::WriteAttributeLocalTemperature(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t localTemperature) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Thermostat::Attributes::Ids::LocalTemperature; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, localTemperature)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMinHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t absMinHeatSetpointLimit) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Thermostat::Attributes::Ids::AbsMinHeatSetpointLimit; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, absMinHeatSetpointLimit)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMaxHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t absMaxHeatSetpointLimit) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Thermostat::Attributes::Ids::AbsMaxHeatSetpointLimit; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, absMaxHeatSetpointLimit)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMinCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t absMinCoolSetpointLimit) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Thermostat::Attributes::Ids::AbsMinCoolSetpointLimit; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, absMinCoolSetpointLimit)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMaxCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t absMaxCoolSetpointLimit) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Thermostat::Attributes::Ids::AbsMaxCoolSetpointLimit; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, absMaxCoolSetpointLimit)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatClusterTest::WriteAttributeStartOfWeek(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t startOfWeek) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Thermostat::Attributes::Ids::StartOfWeek; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, startOfWeek)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatClusterTest::WriteAttributeNumberOfWeeklyTransitions(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t numberOfWeeklyTransitions) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Thermostat::Attributes::Ids::NumberOfWeeklyTransitions; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, numberOfWeeklyTransitions)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatClusterTest::WriteAttributeNumberOfDailyTransitions(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t numberOfDailyTransitions) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Thermostat::Attributes::Ids::NumberOfDailyTransitions; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, numberOfDailyTransitions)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t featureMap) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::FeatureMap; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, featureMap)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatUserInterfaceConfigurationClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeChannel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t channel) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::Channel; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, channel)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRoutingRole(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t routingRole) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RoutingRole; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, routingRole)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeNetworkName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan networkName) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::NetworkName; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, networkName)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributePanId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t panId) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::PanId; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, panId)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeExtendedPanId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t extendedPanId) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::ExtendedPanId; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, extendedPanId)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeMeshLocalPrefix(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan meshLocalPrefix) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::MeshLocalPrefix; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, meshLocalPrefix)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t overrunCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::OverrunCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, overrunCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributePartitionId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t partitionId) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::PartitionId; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, partitionId)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeWeighting(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t weighting) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::Weighting; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, weighting)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeDataVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t dataVersion) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::DataVersion; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, dataVersion)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeStableDataVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t stableDataVersion) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::StableDataVersion; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, stableDataVersion)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeLeaderRouterId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t leaderRouterId) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::LeaderRouterId; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, leaderRouterId)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeDetachedRoleCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t detachedRoleCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::DetachedRoleCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, detachedRoleCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeChildRoleCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t childRoleCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::ChildRoleCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, childRoleCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRouterRoleCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t routerRoleCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RouterRoleCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, routerRoleCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeLeaderRoleCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t leaderRoleCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::LeaderRoleCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, leaderRoleCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeAttachAttemptCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t attachAttemptCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::AttachAttemptCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, attachAttemptCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributePartitionIdChangeCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t partitionIdChangeCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::PartitionIdChangeCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, partitionIdChangeCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeBetterPartitionAttachAttemptCount( + Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t betterPartitionAttachAttemptCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::BetterPartitionAttachAttemptCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, betterPartitionAttachAttemptCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeParentChangeCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t parentChangeCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::ParentChangeCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, parentChangeCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxTotalCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txTotalCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxTotalCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txTotalCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxUnicastCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txUnicastCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxUnicastCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txUnicastCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxBroadcastCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txBroadcastCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxBroadcastCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txBroadcastCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxAckRequestedCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txAckRequestedCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxAckRequestedCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txAckRequestedCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxAckedCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txAckedCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxAckedCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txAckedCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxNoAckRequestedCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txNoAckRequestedCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxNoAckRequestedCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txNoAckRequestedCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxDataCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txDataCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxDataCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txDataCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxDataPollCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txDataPollCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxDataPollCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txDataPollCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxBeaconCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txBeaconCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxBeaconCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txBeaconCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txBeaconRequestCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxBeaconRequestCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txBeaconRequestCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxOtherCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txOtherCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxOtherCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txOtherCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxRetryCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txRetryCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxRetryCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txRetryCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxDirectMaxRetryExpiryCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txDirectMaxRetryExpiryCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxDirectMaxRetryExpiryCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txDirectMaxRetryExpiryCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxIndirectMaxRetryExpiryCount( + Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint32_t txIndirectMaxRetryExpiryCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxIndirectMaxRetryExpiryCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txIndirectMaxRetryExpiryCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxErrCcaCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txErrCcaCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxErrCcaCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txErrCcaCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxErrAbortCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txErrAbortCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxErrAbortCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txErrAbortCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxErrBusyChannelCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t txErrBusyChannelCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::TxErrBusyChannelCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, txErrBusyChannelCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxTotalCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxTotalCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxTotalCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxTotalCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxUnicastCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxUnicastCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxUnicastCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxUnicastCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxBroadcastCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxBroadcastCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxBroadcastCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxBroadcastCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDataCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxDataCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxDataCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxDataCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDataPollCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxDataPollCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxDataPollCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxDataPollCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxBeaconCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxBeaconCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxBeaconCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxBeaconCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxBeaconRequestCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxBeaconRequestCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxBeaconRequestCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxOtherCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxOtherCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxOtherCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxOtherCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxAddressFilteredCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxAddressFilteredCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxAddressFilteredCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxAddressFilteredCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDestAddrFilteredCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxDestAddrFilteredCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxDestAddrFilteredCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxDestAddrFilteredCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDuplicatedCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxDuplicatedCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxDuplicatedCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxDuplicatedCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrNoFrameCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxErrNoFrameCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxErrNoFrameCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxErrNoFrameCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrUnknownNeighborCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxErrUnknownNeighborCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxErrUnknownNeighborCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxErrUnknownNeighborCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrInvalidSrcAddrCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxErrInvalidSrcAddrCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxErrInvalidSrcAddrCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxErrInvalidSrcAddrCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrSecCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxErrSecCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxErrSecCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxErrSecCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrFcsCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxErrFcsCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxErrFcsCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxErrFcsCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrOtherCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t rxErrOtherCount) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::RxErrOtherCount; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rxErrOtherCount)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeChannelMask(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t channelMask) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = ThreadNetworkDiagnostics::Attributes::Ids::ChannelMask; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, channelMask)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WakeOnLanClusterTest::WriteAttributeWakeOnLanMacAddress(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan wakeOnLanMacAddress) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WakeOnLan::Attributes::Ids::WakeOnLanMacAddress; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, wakeOnLanMacAddress)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WakeOnLanClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeBssid(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan bssid) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WiFiNetworkDiagnostics::Attributes::Ids::Bssid; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, bssid)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeSecurityType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t securityType) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WiFiNetworkDiagnostics::Attributes::Ids::SecurityType; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, securityType)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeWiFiVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t wiFiVersion) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WiFiNetworkDiagnostics::Attributes::Ids::WiFiVersion; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, wiFiVersion)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeChannelNumber(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t channelNumber) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WiFiNetworkDiagnostics::Attributes::Ids::ChannelNumber; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, channelNumber)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeRssi(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int8_t rssi) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WiFiNetworkDiagnostics::Attributes::Ids::Rssi; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, rssi)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t type) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::Type; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, type)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t currentPositionLift) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::CurrentPositionLift; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentPositionLift)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t currentPositionTilt) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::CurrentPositionTilt; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentPositionTilt)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeConfigStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t configStatus) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::ConfigStatus; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, configStatus)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionLiftPercentage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t currentPositionLiftPercentage) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::CurrentPositionLiftPercentage; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentPositionLiftPercentage)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionTiltPercentage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t currentPositionTiltPercentage) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::CurrentPositionTiltPercentage; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentPositionTiltPercentage)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeOperationalStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t operationalStatus) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::OperationalStatus; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, operationalStatus)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeTargetPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t targetPositionLiftPercent100ths) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::TargetPositionLiftPercent100ths; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, targetPositionLiftPercent100ths)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeTargetPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t targetPositionTiltPercent100ths) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::TargetPositionTiltPercent100ths; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, targetPositionTiltPercent100ths)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeEndProductType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t endProductType) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::EndProductType; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, endProductType)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t currentPositionLiftPercent100ths) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::CurrentPositionLiftPercent100ths; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentPositionLiftPercent100ths)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t currentPositionTiltPercent100ths) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::CurrentPositionTiltPercent100ths; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, currentPositionTiltPercent100ths)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledOpenLimitLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t installedOpenLimitLift) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::InstalledOpenLimitLift; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, installedOpenLimitLift)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledClosedLimitLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t installedClosedLimitLift) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::InstalledClosedLimitLift; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, installedClosedLimitLift)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledOpenLimitTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t installedOpenLimitTilt) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::InstalledOpenLimitTilt; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, installedOpenLimitTilt)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledClosedLimitTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t installedClosedLimitTilt) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::InstalledClosedLimitTilt; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, installedClosedLimitTilt)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeSafetyStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t safetyStatus) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = WindowCovering::Attributes::Ids::SafetyStatus; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, safetyStatus)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::Ids::ClusterRevision; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeScalarAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +} // namespace Controller +} // namespace chip diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClusters.h new file mode 100644 index 00000000000000..eaca7368339ad4 --- /dev/null +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClusters.h @@ -0,0 +1,993 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#pragma once + +#include + +namespace chip { +namespace Controller { + +class DLL_EXPORT AccountLoginClusterTest : public AccountLoginCluster +{ +public: + AccountLoginClusterTest() : AccountLoginCluster() {} + ~AccountLoginClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT AdministratorCommissioningClusterTest : public AdministratorCommissioningCluster +{ +public: + AdministratorCommissioningClusterTest() : AdministratorCommissioningCluster() {} + ~AdministratorCommissioningClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT ApplicationBasicClusterTest : public ApplicationBasicCluster +{ +public: + ApplicationBasicClusterTest() : ApplicationBasicCluster() {} + ~ApplicationBasicClusterTest() {} + + CHIP_ERROR WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeVendorId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeApplicationName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeProductId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeApplicationId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeCatalogVendorId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeApplicationStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT ApplicationLauncherClusterTest : public ApplicationLauncherCluster +{ +public: + ApplicationLauncherClusterTest() : ApplicationLauncherCluster() {} + ~ApplicationLauncherClusterTest() {} + + CHIP_ERROR WriteAttributeCatalogVendorId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeApplicationId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT AudioOutputClusterTest : public AudioOutputCluster +{ +public: + AudioOutputClusterTest() : AudioOutputCluster() {} + ~AudioOutputClusterTest() {} + + CHIP_ERROR WriteAttributeCurrentAudioOutput(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT BarrierControlClusterTest : public BarrierControlCluster +{ +public: + BarrierControlClusterTest() : BarrierControlCluster() {} + ~BarrierControlClusterTest() {} + + CHIP_ERROR WriteAttributeBarrierMovingState(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeBarrierSafetyStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeBarrierCapabilities(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeBarrierPosition(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT BasicClusterTest : public BasicCluster +{ +public: + BasicClusterTest() : BasicCluster() {} + ~BasicClusterTest() {} + + CHIP_ERROR WriteAttributeInteractionModelVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeVendorID(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeProductName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeProductID(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan value); + CHIP_ERROR WriteAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan value); + CHIP_ERROR WriteAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributePartNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeProductURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeProductLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeReachable(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + bool value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT BinaryInputBasicClusterTest : public BinaryInputBasicCluster +{ +public: + BinaryInputBasicClusterTest() : BinaryInputBasicCluster() {} + ~BinaryInputBasicClusterTest() {} + + CHIP_ERROR WriteAttributeStatusFlags(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT BindingClusterTest : public BindingCluster +{ +public: + BindingClusterTest() : BindingCluster() {} + ~BindingClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT BridgedDeviceBasicClusterTest : public BridgedDeviceBasicCluster +{ +public: + BridgedDeviceBasicClusterTest() : BridgedDeviceBasicCluster() {} + ~BridgedDeviceBasicClusterTest() {} + + CHIP_ERROR WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeVendorID(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeProductName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan value); + CHIP_ERROR WriteAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan value); + CHIP_ERROR WriteAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributePartNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeProductURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeProductLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeReachable(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + bool value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT ColorControlClusterTest : public ColorControlCluster +{ +public: + ColorControlClusterTest() : ColorControlCluster() {} + ~ColorControlClusterTest() {} + + CHIP_ERROR WriteAttributeCurrentHue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeCurrentSaturation(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeCurrentX(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeCurrentY(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeDriftCompensation(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeCompensationText(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeColorTemperature(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeColorMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeNumberOfPrimaries(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributePrimary1X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary1Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary1Intensity(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributePrimary2X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary2Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary2Intensity(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributePrimary3X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary3Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary3Intensity(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributePrimary4X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary4Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary4Intensity(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributePrimary5X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary5Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary5Intensity(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributePrimary6X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary6Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePrimary6Intensity(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeEnhancedCurrentHue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeEnhancedColorMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeColorLoopActive(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeColorLoopDirection(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeColorLoopTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeColorLoopStartEnhancedHue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeColorLoopStoredEnhancedHue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeColorCapabilities(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeColorTempPhysicalMin(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeColorTempPhysicalMax(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeCoupleColorTempToLevelMinMireds(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT ContentLauncherClusterTest : public ContentLauncherCluster +{ +public: + ContentLauncherClusterTest() : ContentLauncherCluster() {} + ~ContentLauncherClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT DescriptorClusterTest : public DescriptorCluster +{ +public: + DescriptorClusterTest() : DescriptorCluster() {} + ~DescriptorClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT DiagnosticLogsClusterTest : public DiagnosticLogsCluster +{ +public: + DiagnosticLogsClusterTest() : DiagnosticLogsCluster() {} + ~DiagnosticLogsClusterTest() {} +}; + +class DLL_EXPORT DoorLockClusterTest : public DoorLockCluster +{ +public: + DoorLockClusterTest() : DoorLockCluster() {} + ~DoorLockClusterTest() {} + + CHIP_ERROR WriteAttributeLockState(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeLockType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeActuatorEnabled(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + bool value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT ElectricalMeasurementClusterTest : public ElectricalMeasurementCluster +{ +public: + ElectricalMeasurementClusterTest() : ElectricalMeasurementCluster() {} + ~ElectricalMeasurementClusterTest() {} + + CHIP_ERROR WriteAttributeMeasurementType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTotalActivePower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int32_t value); + CHIP_ERROR WriteAttributeRmsVoltage(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeRmsVoltageMin(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeRmsVoltageMax(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeRmsCurrent(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeRmsCurrentMin(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeRmsCurrentMax(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeActivePower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeActivePowerMin(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeActivePowerMax(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT EthernetNetworkDiagnosticsClusterTest : public EthernetNetworkDiagnosticsCluster +{ +public: + EthernetNetworkDiagnosticsClusterTest() : EthernetNetworkDiagnosticsCluster() {} + ~EthernetNetworkDiagnosticsClusterTest() {} + + CHIP_ERROR WriteAttributePacketRxCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint64_t value); + CHIP_ERROR WriteAttributePacketTxCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint64_t value); + CHIP_ERROR WriteAttributeTxErrCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint64_t value); + CHIP_ERROR WriteAttributeCollisionCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint64_t value); + CHIP_ERROR WriteAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint64_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT FixedLabelClusterTest : public FixedLabelCluster +{ +public: + FixedLabelClusterTest() : FixedLabelCluster() {} + ~FixedLabelClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT FlowMeasurementClusterTest : public FlowMeasurementCluster +{ +public: + FlowMeasurementClusterTest() : FlowMeasurementCluster() {} + ~FlowMeasurementClusterTest() {} + + CHIP_ERROR WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT GeneralCommissioningClusterTest : public GeneralCommissioningCluster +{ +public: + GeneralCommissioningClusterTest() : GeneralCommissioningCluster() {} + ~GeneralCommissioningClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT GeneralDiagnosticsClusterTest : public GeneralDiagnosticsCluster +{ +public: + GeneralDiagnosticsClusterTest() : GeneralDiagnosticsCluster() {} + ~GeneralDiagnosticsClusterTest() {} + + CHIP_ERROR WriteAttributeRebootCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT GroupKeyManagementClusterTest : public GroupKeyManagementCluster +{ +public: + GroupKeyManagementClusterTest() : GroupKeyManagementCluster() {} + ~GroupKeyManagementClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT GroupsClusterTest : public GroupsCluster +{ +public: + GroupsClusterTest() : GroupsCluster() {} + ~GroupsClusterTest() {} + + CHIP_ERROR WriteAttributeNameSupport(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT IdentifyClusterTest : public IdentifyCluster +{ +public: + IdentifyClusterTest() : IdentifyCluster() {} + ~IdentifyClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT KeypadInputClusterTest : public KeypadInputCluster +{ +public: + KeypadInputClusterTest() : KeypadInputCluster() {} + ~KeypadInputClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT LevelControlClusterTest : public LevelControlCluster +{ +public: + LevelControlClusterTest() : LevelControlCluster() {} + ~LevelControlClusterTest() {} + + CHIP_ERROR WriteAttributeCurrentLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT LowPowerClusterTest : public LowPowerCluster +{ +public: + LowPowerClusterTest() : LowPowerCluster() {} + ~LowPowerClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT MediaInputClusterTest : public MediaInputCluster +{ +public: + MediaInputClusterTest() : MediaInputCluster() {} + ~MediaInputClusterTest() {} + + CHIP_ERROR WriteAttributeCurrentMediaInput(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT MediaPlaybackClusterTest : public MediaPlaybackCluster +{ +public: + MediaPlaybackClusterTest() : MediaPlaybackCluster() {} + ~MediaPlaybackClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT NetworkCommissioningClusterTest : public NetworkCommissioningCluster +{ +public: + NetworkCommissioningClusterTest() : NetworkCommissioningCluster() {} + ~NetworkCommissioningClusterTest() {} + + CHIP_ERROR WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT OtaSoftwareUpdateProviderClusterTest : public OtaSoftwareUpdateProviderCluster +{ +public: + OtaSoftwareUpdateProviderClusterTest() : OtaSoftwareUpdateProviderCluster() {} + ~OtaSoftwareUpdateProviderClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT OccupancySensingClusterTest : public OccupancySensingCluster +{ +public: + OccupancySensingClusterTest() : OccupancySensingCluster() {} + ~OccupancySensingClusterTest() {} + + CHIP_ERROR WriteAttributeOccupancy(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeOccupancySensorType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeOccupancySensorTypeBitmap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT OnOffClusterTest : public OnOffCluster +{ +public: + OnOffClusterTest() : OnOffCluster() {} + ~OnOffClusterTest() {} + + CHIP_ERROR WriteAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, bool value); + CHIP_ERROR WriteAttributeGlobalSceneControl(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + bool value); + CHIP_ERROR WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT OnOffSwitchConfigurationClusterTest : public OnOffSwitchConfigurationCluster +{ +public: + OnOffSwitchConfigurationClusterTest() : OnOffSwitchConfigurationCluster() {} + ~OnOffSwitchConfigurationClusterTest() {} + + CHIP_ERROR WriteAttributeSwitchType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT OperationalCredentialsClusterTest : public OperationalCredentialsCluster +{ +public: + OperationalCredentialsClusterTest() : OperationalCredentialsCluster() {} + ~OperationalCredentialsClusterTest() {} + + CHIP_ERROR WriteAttributeSupportedFabrics(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeCommissionedFabrics(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT PressureMeasurementClusterTest : public PressureMeasurementCluster +{ +public: + PressureMeasurementClusterTest() : PressureMeasurementCluster() {} + ~PressureMeasurementClusterTest() {} + + CHIP_ERROR WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT PumpConfigurationAndControlClusterTest : public PumpConfigurationAndControlCluster +{ +public: + PumpConfigurationAndControlClusterTest() : PumpConfigurationAndControlCluster() {} + ~PumpConfigurationAndControlClusterTest() {} + + CHIP_ERROR WriteAttributeMaxPressure(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeMaxSpeed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeMaxFlow(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeEffectiveOperationMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value); + CHIP_ERROR WriteAttributeEffectiveControlMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value); + CHIP_ERROR WriteAttributeCapacity(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT RelativeHumidityMeasurementClusterTest : public RelativeHumidityMeasurementCluster +{ +public: + RelativeHumidityMeasurementClusterTest() : RelativeHumidityMeasurementCluster() {} + ~RelativeHumidityMeasurementClusterTest() {} + + CHIP_ERROR WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT ScenesClusterTest : public ScenesCluster +{ +public: + ScenesClusterTest() : ScenesCluster() {} + ~ScenesClusterTest() {} + + CHIP_ERROR WriteAttributeSceneCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeCurrentScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeCurrentGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeSceneValid(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + bool value); + CHIP_ERROR WriteAttributeNameSupport(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT SoftwareDiagnosticsClusterTest : public SoftwareDiagnosticsCluster +{ +public: + SoftwareDiagnosticsClusterTest() : SoftwareDiagnosticsCluster() {} + ~SoftwareDiagnosticsClusterTest() {} + + CHIP_ERROR WriteAttributeCurrentHeapHighWatermark(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT SwitchClusterTest : public SwitchCluster +{ +public: + SwitchClusterTest() : SwitchCluster() {} + ~SwitchClusterTest() {} + + CHIP_ERROR WriteAttributeNumberOfPositions(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeCurrentPosition(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT TvChannelClusterTest : public TvChannelCluster +{ +public: + TvChannelClusterTest() : TvChannelCluster() {} + ~TvChannelClusterTest() {} + + CHIP_ERROR WriteAttributeTvChannelLineup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeCurrentTvChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT TargetNavigatorClusterTest : public TargetNavigatorCluster +{ +public: + TargetNavigatorClusterTest() : TargetNavigatorCluster() {} + ~TargetNavigatorClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT TemperatureMeasurementClusterTest : public TemperatureMeasurementCluster +{ +public: + TemperatureMeasurementClusterTest() : TemperatureMeasurementCluster() {} + ~TemperatureMeasurementClusterTest() {} + + CHIP_ERROR WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT TestClusterClusterTest : public TestClusterCluster +{ +public: + TestClusterClusterTest() : TestClusterCluster() {} + ~TestClusterClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT ThermostatClusterTest : public ThermostatCluster +{ +public: + ThermostatClusterTest() : ThermostatCluster() {} + ~ThermostatClusterTest() {} + + CHIP_ERROR WriteAttributeLocalTemperature(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeAbsMinHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value); + CHIP_ERROR WriteAttributeAbsMaxHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value); + CHIP_ERROR WriteAttributeAbsMinCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value); + CHIP_ERROR WriteAttributeAbsMaxCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value); + CHIP_ERROR WriteAttributeStartOfWeek(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeNumberOfWeeklyTransitions(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value); + CHIP_ERROR WriteAttributeNumberOfDailyTransitions(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value); + CHIP_ERROR WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT ThermostatUserInterfaceConfigurationClusterTest : public ThermostatUserInterfaceConfigurationCluster +{ +public: + ThermostatUserInterfaceConfigurationClusterTest() : ThermostatUserInterfaceConfigurationCluster() {} + ~ThermostatUserInterfaceConfigurationClusterTest() {} + + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT ThreadNetworkDiagnosticsClusterTest : public ThreadNetworkDiagnosticsCluster +{ +public: + ThreadNetworkDiagnosticsClusterTest() : ThreadNetworkDiagnosticsCluster() {} + ~ThreadNetworkDiagnosticsClusterTest() {} + + CHIP_ERROR WriteAttributeChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeRoutingRole(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeNetworkName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributePanId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeExtendedPanId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint64_t value); + CHIP_ERROR WriteAttributeMeshLocalPrefix(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint64_t value); + CHIP_ERROR WriteAttributePartitionId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeWeighting(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeDataVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeStableDataVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeLeaderRouterId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeDetachedRoleCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeChildRoleCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeRouterRoleCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeLeaderRoleCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeAttachAttemptCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributePartitionIdChangeCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeBetterPartitionAttachAttemptCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeParentChangeCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeTxTotalCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxUnicastCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxBroadcastCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxAckRequestedCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxAckedCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxNoAckRequestedCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributeTxDataCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxDataPollCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxBeaconCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributeTxOtherCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxRetryCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxDirectMaxRetryExpiryCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributeTxIndirectMaxRetryExpiryCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributeTxErrCcaCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxErrAbortCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeTxErrBusyChannelCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributeRxTotalCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeRxUnicastCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeRxBroadcastCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeRxDataCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeRxDataPollCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeRxBeaconCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeRxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributeRxOtherCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeRxAddressFilteredCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributeRxDestAddrFilteredCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributeRxDuplicatedCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeRxErrNoFrameCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeRxErrUnknownNeighborCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributeRxErrInvalidSrcAddrCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributeRxErrSecCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeRxErrFcsCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeRxErrOtherCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeChannelMask(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT WakeOnLanClusterTest : public WakeOnLanCluster +{ +public: + WakeOnLanClusterTest() : WakeOnLanCluster() {} + ~WakeOnLanClusterTest() {} + + CHIP_ERROR WriteAttributeWakeOnLanMacAddress(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT WiFiNetworkDiagnosticsClusterTest : public WiFiNetworkDiagnosticsCluster +{ +public: + WiFiNetworkDiagnosticsClusterTest() : WiFiNetworkDiagnosticsCluster() {} + ~WiFiNetworkDiagnosticsClusterTest() {} + + CHIP_ERROR WriteAttributeBssid(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeSecurityType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeWiFiVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeChannelNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeRssi(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, int8_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +class DLL_EXPORT WindowCoveringClusterTest : public WindowCoveringCluster +{ +public: + WindowCoveringClusterTest() : WindowCoveringCluster() {} + ~WindowCoveringClusterTest() {} + + CHIP_ERROR WriteAttributeType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeCurrentPositionLift(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeCurrentPositionTilt(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeConfigStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeCurrentPositionLiftPercentage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value); + CHIP_ERROR WriteAttributeCurrentPositionTiltPercentage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value); + CHIP_ERROR WriteAttributeOperationalStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeTargetPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeTargetPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeEndProductType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeCurrentPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeCurrentPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeInstalledOpenLimitLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeInstalledClosedLimitLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeInstalledOpenLimitTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeInstalledClosedLimitTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value); + CHIP_ERROR WriteAttributeSafetyStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + +} // namespace Controller +} // namespace chip