diff --git a/src/app/tests/suites/TestCluster.yaml b/src/app/tests/suites/TestCluster.yaml index e9dbb052b13987..a16cb7dfb01167 100644 --- a/src/app/tests/suites/TestCluster.yaml +++ b/src/app/tests/suites/TestCluster.yaml @@ -2409,3 +2409,828 @@ tests: attribute: "list_int8u" response: value: [5, 6, 7, 8] + + # Tests for range-checking on the server. + - label: "Read range-restricted unsigned 8-bit integer" + command: "readAttribute" + attribute: "range_restricted_int8u" + response: + value: 70 # That's the default. + + - label: "Write min value to a range-restricted unsigned 8-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int8u" + arguments: + value: 0 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-below-range value to a range-restricted unsigned 8-bit + integer" + command: "writeAttribute" + attribute: "range_restricted_int8u" + arguments: + value: 19 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-above-range value to a range-restricted unsigned 8-bit + integer" + command: "writeAttribute" + attribute: "range_restricted_int8u" + arguments: + value: 101 + response: + error: CONSTRAINT_ERROR + + - label: "Write max value to a range-restricted unsigned 8-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int8u" + arguments: + value: 255 + response: + error: CONSTRAINT_ERROR + + - label: + "Verify range-restricted unsigned 8-bit integer value has not changed" + command: "readAttribute" + attribute: "range_restricted_int8u" + response: + value: 70 + + - label: + "Write min valid value to a range-restricted unsigned 8-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int8u" + arguments: + value: 20 + + - label: + "Verify range-restricted unsigned 8-bit integer value is at min valid" + command: "readAttribute" + attribute: "range_restricted_int8u" + response: + value: 20 + + - label: + "Write max valid value to a range-restricted unsigned 8-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int8u" + arguments: + value: 100 + + - label: + "Verify range-restricted unsigned 8-bit integer value is at max valid" + command: "readAttribute" + attribute: "range_restricted_int8u" + response: + value: 100 + + - label: + "Write middle valid value to a range-restricted unsigned 8-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int8u" + arguments: + value: 50 + + - label: + "Verify range-restricted unsigned 8-bit integer value is at mid valid" + command: "readAttribute" + attribute: "range_restricted_int8u" + response: + value: 50 + + - label: "Read range-restricted unsigned 16-bit integer" + command: "readAttribute" + attribute: "range_restricted_int16u" + response: + value: 200 # That's the default. + + - label: "Write min value to a range-restricted unsigned 16-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int16u" + arguments: + value: 0 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-below-range value to a range-restricted unsigned 16-bit + integer" + command: "writeAttribute" + attribute: "range_restricted_int16u" + arguments: + value: 99 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-above-range value to a range-restricted unsigned 16-bit + integer" + command: "writeAttribute" + attribute: "range_restricted_int16u" + arguments: + value: 1001 + response: + error: CONSTRAINT_ERROR + + - label: "Write max value to a range-restricted unsigned 16-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int16u" + arguments: + value: 65535 + response: + error: CONSTRAINT_ERROR + + - label: + "Verify range-restricted unsigned 16-bit integer value has not changed" + command: "readAttribute" + attribute: "range_restricted_int16u" + response: + value: 200 + + - label: + "Write min valid value to a range-restricted unsigned 16-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int16u" + arguments: + value: 100 + + - label: + "Verify range-restricted unsigned 16-bit integer value is at min valid" + command: "readAttribute" + attribute: "range_restricted_int16u" + response: + value: 100 + + - label: + "Write max valid value to a range-restricted unsigned 16-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int16u" + arguments: + value: 1000 + + - label: + "Verify range-restricted unsigned 16-bit integer value is at max valid" + command: "readAttribute" + attribute: "range_restricted_int16u" + response: + value: 1000 + + - label: + "Write middle valid value to a range-restricted unsigned 16-bit + integer" + command: "writeAttribute" + attribute: "range_restricted_int16u" + arguments: + value: 500 + + - label: + "Verify range-restricted unsigned 16-bit integer value is at mid valid" + command: "readAttribute" + attribute: "range_restricted_int16u" + response: + value: 500 + + - label: "Read range-restricted signed 8-bit integer" + command: "readAttribute" + attribute: "range_restricted_int8s" + response: + value: 0 # ZAP won't allow setting a negative default! + + - label: "Write min value to a range-restricted signed 8-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int8s" + arguments: + value: -128 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-below-range value to a range-restricted signed 8-bit + integer" + command: "writeAttribute" + attribute: "range_restricted_int8s" + arguments: + value: -41 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-above-range value to a range-restricted signed 8-bit + integer" + command: "writeAttribute" + attribute: "range_restricted_int8s" + arguments: + value: 51 + response: + error: CONSTRAINT_ERROR + + - label: "Write max value to a range-restricted signed 8-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int8s" + arguments: + value: 127 + response: + error: CONSTRAINT_ERROR + + - label: + "Verify range-restricted signed 8-bit integer value has not changed" + command: "readAttribute" + attribute: "range_restricted_int8s" + response: + value: 0 + + - label: "Write min valid value to a range-restricted signed 8-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int8s" + arguments: + value: -40 + + - label: + "Verify range-restricted signed 8-bit integer value is at min valid" + command: "readAttribute" + attribute: "range_restricted_int8s" + response: + value: -40 + + - label: "Write max valid value to a range-restricted signed 8-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int8s" + arguments: + value: 50 + + - label: + "Verify range-restricted signed 8-bit integer value is at max valid" + command: "readAttribute" + attribute: "range_restricted_int8s" + response: + value: 50 + + - label: + "Write middle valid value to a range-restricted signed 8-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int8s" + arguments: + value: 6 + + - label: + "Verify range-restricted signed 8-bit integer value is at mid valid" + command: "readAttribute" + attribute: "range_restricted_int8s" + response: + value: 6 + + - label: "Read range-restricted signed 16-bit integer" + command: "readAttribute" + attribute: "range_restricted_int16s" + response: + value: 0 # ZAP won't allow setting a negative default! + + - label: "Write min value to a range-restricted signed 16-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int16s" + arguments: + value: -32768 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-below-range value to a range-restricted signed 16-bit + integer" + command: "writeAttribute" + attribute: "range_restricted_int16s" + arguments: + value: -151 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-above-range value to a range-restricted signed 16-bit + integer" + command: "writeAttribute" + attribute: "range_restricted_int16s" + arguments: + value: 201 + response: + error: CONSTRAINT_ERROR + + - label: "Write max value to a range-restricted signed 16-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int16s" + arguments: + value: 32767 + response: + error: CONSTRAINT_ERROR + + - label: + "Verify range-restricted signed 16-bit integer value has not changed" + command: "readAttribute" + attribute: "range_restricted_int16s" + response: + value: 0 + + - label: "Write min valid value to a range-restricted signed 16-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int16s" + arguments: + value: -150 + + - label: + "Verify range-restricted signed 16-bit integer value is at min valid" + command: "readAttribute" + attribute: "range_restricted_int16s" + response: + value: -150 + + - label: "Write max valid value to a range-restricted signed 16-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int16s" + arguments: + value: 200 + + - label: + "Verify range-restricted signed 16-bit integer value is at max valid" + command: "readAttribute" + attribute: "range_restricted_int16s" + response: + value: 200 + + - label: + "Write middle valid value to a range-restricted signed 16-bit integer" + command: "writeAttribute" + attribute: "range_restricted_int16s" + arguments: + value: 7 + + - label: + "Verify range-restricted signed 16-bit integer value is at mid valid" + command: "readAttribute" + attribute: "range_restricted_int16s" + response: + value: 7 + + # Tests for range-checking for nullable attributes on the server. + - label: "Read nullable range-restricted unsigned 8-bit integer" + command: "readAttribute" + attribute: "nullable_range_restricted_int8u" + response: + value: 70 # That's the default. + + - label: + "Write min value to a nullable range-restricted unsigned 8-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8u" + arguments: + value: 0 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-below-range value to a nullable range-restricted unsigned + 8-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8u" + arguments: + value: 19 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-above-range value to a nullable range-restricted unsigned + 8-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8u" + arguments: + value: 101 + response: + error: CONSTRAINT_ERROR + + - label: + "Write max value to a nullable range-restricted unsigned 8-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8u" + arguments: + value: 254 + response: + error: CONSTRAINT_ERROR + + - label: + "Verify nullable range-restricted unsigned 8-bit integer value has not + changed" + command: "readAttribute" + attribute: "nullable_range_restricted_int8u" + response: + value: 70 + + - label: + "Write min valid value to a nullable range-restricted unsigned 8-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8u" + arguments: + value: 20 + + - label: + "Verify nullable range-restricted unsigned 8-bit integer value is at + min valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int8u" + response: + value: 20 + + - label: + "Write max valid value to a nullable range-restricted unsigned 8-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8u" + arguments: + value: 100 + + - label: + "Verify nullable range-restricted unsigned 8-bit integer value is at + max valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int8u" + response: + value: 100 + + - label: + "Write middle valid value to a nullable range-restricted unsigned + 8-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8u" + arguments: + value: 50 + + - label: + "Verify nullable range-restricted unsigned 8-bit integer value is at + mid valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int8u" + response: + value: 50 + + - label: + "Write null value to a nullable range-restricted unsigned 8-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8u" + arguments: + value: null + + - label: + "Verify nullable range-restricted unsigned 8-bit integer value is null" + command: "readAttribute" + attribute: "nullable_range_restricted_int8u" + response: + value: null + + - label: "Read nullable range-restricted unsigned 16-bit integer" + command: "readAttribute" + attribute: "nullable_range_restricted_int16u" + response: + value: 200 # That's the default. + + - label: + "Write min value to a nullable range-restricted unsigned 16-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16u" + arguments: + value: 0 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-below-range value to a nullable range-restricted unsigned + 16-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16u" + arguments: + value: 99 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-above-range value to a nullable range-restricted unsigned + 16-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16u" + arguments: + value: 1001 + response: + error: CONSTRAINT_ERROR + + - label: + "Write max value to a nullable range-restricted unsigned 16-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16u" + arguments: + value: 65534 + response: + error: CONSTRAINT_ERROR + + - label: + "Verify nullable range-restricted unsigned 16-bit integer value has + not changed" + command: "readAttribute" + attribute: "nullable_range_restricted_int16u" + response: + value: 200 + + - label: + "Write min valid value to a nullable range-restricted unsigned 16-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16u" + arguments: + value: 100 + + - label: + "Verify nullable range-restricted unsigned 16-bit integer value is at + min valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int16u" + response: + value: 100 + + - label: + "Write max valid value to a nullable range-restricted unsigned 16-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16u" + arguments: + value: 1000 + + - label: + "Verify nullable range-restricted unsigned 16-bit integer value is at + max valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int16u" + response: + value: 1000 + + - label: + "Write middle valid value to a nullable range-restricted unsigned + 16-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16u" + arguments: + value: 500 + + - label: + "Verify nullable range-restricted unsigned 16-bit integer value is at + mid valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int16u" + response: + value: 500 + + - label: + "Write null value to a nullable range-restricted unsigned 16-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16u" + arguments: + value: null + + - label: + "Verify nullable range-restricted unsigned 16-bit integer value is + null" + command: "readAttribute" + attribute: "nullable_range_restricted_int16u" + response: + value: null + + - label: "Read nullable range-restricted signed 8-bit integer" + command: "readAttribute" + attribute: "nullable_range_restricted_int8s" + response: + value: 0 # ZAP won't allow setting a negative default! + + - label: + "Write min value to a nullable range-restricted signed 8-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8s" + arguments: + value: -127 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-below-range value to a nullable range-restricted signed + 8-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8s" + arguments: + value: -41 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-above-range value to a nullable range-restricted signed + 8-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8s" + arguments: + value: 51 + response: + error: CONSTRAINT_ERROR + + - label: + "Write max value to a nullable range-restricted signed 8-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8s" + arguments: + value: 127 + response: + error: CONSTRAINT_ERROR + + - label: + "Verify nullable range-restricted signed 8-bit integer value has not + changed" + command: "readAttribute" + attribute: "nullable_range_restricted_int8s" + response: + value: 0 + + - label: + "Write min valid value to a nullable range-restricted signed 8-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8s" + arguments: + value: -40 + + - label: + "Verify nullable range-restricted signed 8-bit integer value is at min + valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int8s" + response: + value: -40 + + - label: + "Write max valid value to a nullable range-restricted signed 8-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8s" + arguments: + value: 50 + + - label: + "Verify nullable range-restricted signed 8-bit integer value is at max + valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int8s" + response: + value: 50 + + - label: + "Write middle valid value to a nullable range-restricted signed 8-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8s" + arguments: + value: 6 + + - label: + "Verify nullable range-restricted signed 8-bit integer value is at mid + valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int8s" + response: + value: 6 + + - label: + "Write null value to a nullable range-restricted signed 8-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int8s" + arguments: + value: null + + - label: + "Verify nullable range-restricted signed 8-bit integer value is at + null" + command: "readAttribute" + attribute: "nullable_range_restricted_int8s" + response: + value: null + + - label: "Read nullable range-restricted signed 16-bit integer" + command: "readAttribute" + attribute: "nullable_range_restricted_int16s" + response: + value: 0 # ZAP won't allow setting a negative default! + + - label: + "Write min value to a nullable range-restricted signed 16-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16s" + arguments: + value: -32767 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-below-range value to a nullable range-restricted signed + 16-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16s" + arguments: + value: -151 + response: + error: CONSTRAINT_ERROR + + - label: + "Write just-above-range value to a nullable range-restricted signed + 16-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16s" + arguments: + value: 201 + response: + error: CONSTRAINT_ERROR + + - label: + "Write max value to a nullable range-restricted signed 16-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16s" + arguments: + value: 32767 + response: + error: CONSTRAINT_ERROR + + - label: + "Verify nullable range-restricted signed 16-bit integer value has not + changed" + command: "readAttribute" + attribute: "nullable_range_restricted_int16s" + response: + value: 0 + + - label: + "Write min valid value to a nullable range-restricted signed 16-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16s" + arguments: + value: -150 + + - label: + "Verify nullable range-restricted signed 16-bit integer value is at + min valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int16s" + response: + value: -150 + + - label: + "Write max valid value to a nullable range-restricted signed 16-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16s" + arguments: + value: 200 + + - label: + "Verify nullable range-restricted signed 16-bit integer value is at + max valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int16s" + response: + value: 200 + + - label: + "Write middle valid value to a nullable range-restricted signed 16-bit + integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16s" + arguments: + value: 7 + + - label: + "Verify nullable range-restricted signed 16-bit integer value is at + mid valid" + command: "readAttribute" + attribute: "nullable_range_restricted_int16s" + response: + value: 7 + + - label: + "Write null value to a nullable range-restricted signed 16-bit integer" + command: "writeAttribute" + attribute: "nullable_range_restricted_int16s" + arguments: + value: null + + - label: + "Verify nullable range-restricted signed 16-bit integer value is null" + command: "readAttribute" + attribute: "nullable_range_restricted_int16s" + response: + value: null diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index da1e2dfcd0e50b..0dc8bad1f60c77 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -459,6 +460,62 @@ EmberAfStatus emberAfAppendAttributeReportFields(EndpointId endpoint, ClusterId //------------------------------------------------------------------------------ // Internal Functions +// Helper for determining whether a value is a null value. +template +static bool IsNullValue(const uint8_t * data) +{ + using Traits = app::NumericAttributeTraits; + // We don't know how data is aligned, so safely copy it over to the relevant + // StorageType value. + typename Traits::StorageType val; + memcpy(&val, data, sizeof(val)); + return Traits::IsNullValue(val); +} + +static bool IsNullValue(const uint8_t * data, uint16_t dataLen, bool isAttributeSigned) +{ + if (dataLen > 4) + { + // We don't support this, just like emberAfCompareValues does not. + return false; + } + + switch (dataLen) + { + case 1: { + if (isAttributeSigned) + { + return IsNullValue(data); + } + return IsNullValue(data); + } + case 2: { + if (isAttributeSigned) + { + return IsNullValue(data); + } + return IsNullValue(data); + } + case 3: { + if (isAttributeSigned) + { + return IsNullValue>(data); + } + return IsNullValue>(data); + } + case 4: { + if (isAttributeSigned) + { + return IsNullValue(data); + } + return IsNullValue(data); + } + } + + // Not reached. + return false; +} + // writes an attribute (identified by clusterID and attrID to the given value. // this returns: // - EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE: if attribute isnt supported by the device (the @@ -546,15 +603,19 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu #endif // BIGENDIAN_CPU minR = emberAfCompareValues(minI, data, dataLen, isAttributeSigned); maxR = emberAfCompareValues(maxI, data, dataLen, isAttributeSigned); - if ((minR == 1) || (maxR == -1)) + if (((minR == 1) || (maxR == -1)) && + // null value is always in-range for a nullable attribute. + (!metadata->IsNullable() || !IsNullValue(data, dataLen, isAttributeSigned))) { return EMBER_ZCL_STATUS_INVALID_VALUE; } } else { - if ((emberAfCompareValues(minv.ptrToDefaultValue, data, dataLen, isAttributeSigned) == 1) || - (emberAfCompareValues(maxv.ptrToDefaultValue, data, dataLen, isAttributeSigned) == -1)) + if (((emberAfCompareValues(minv.ptrToDefaultValue, data, dataLen, isAttributeSigned) == 1) || + (emberAfCompareValues(maxv.ptrToDefaultValue, data, dataLen, isAttributeSigned) == -1)) && + // null value is always in-range for a nullable attribute. + (!metadata->IsNullable() || !IsNullValue(data, dataLen, isAttributeSigned))) { return EMBER_ZCL_STATUS_INVALID_VALUE; } diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index a379d3fc4aeded..18b3d6cee6d0f6 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -27413,6 +27413,2608 @@ - (void)testSendClusterTestCluster_000301_WaitForReport [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTestCluster_000302_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read range-restricted unsigned 8-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 70); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000303_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min value to a range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:0]; + [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min value to a range-restricted unsigned 8-bit integer Error: %@", err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000304_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-below-range value to a range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:19]; + [cluster + writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a range-restricted unsigned 8-bit integer Error: %@", + err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000305_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-above-range value to a range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:101]; + [cluster + writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a range-restricted unsigned 8-bit integer Error: %@", + err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000306_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max value to a range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:255]; + [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max value to a range-restricted unsigned 8-bit integer Error: %@", err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000307_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted unsigned 8-bit integer value has not changed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted unsigned 8-bit integer value has not changed Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 70); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000308_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min valid value to a range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:20]; + [cluster + writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a range-restricted unsigned 8-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000309_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted unsigned 8-bit integer value is at min valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted unsigned 8-bit integer value is at min valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 20); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000310_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max valid value to a range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:100]; + [cluster + writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a range-restricted unsigned 8-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000311_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted unsigned 8-bit integer value is at max valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted unsigned 8-bit integer value is at max valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 100); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000312_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write middle valid value to a range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:50]; + [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a range-restricted unsigned 8-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000313_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted unsigned 8-bit integer value is at mid valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted unsigned 8-bit integer value is at mid valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 50); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000314_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read range-restricted unsigned 16-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 200U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000315_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min value to a range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min value to a range-restricted unsigned 16-bit integer Error: %@", err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000316_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-below-range value to a range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:99U]; + [cluster + writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"Write just-below-range value to a range-restricted unsigned 16-bit integer Error: %@", + err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000317_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-above-range value to a range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1001U]; + [cluster + writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"Write just-above-range value to a range-restricted unsigned 16-bit integer Error: %@", + err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000318_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max value to a range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:65535U]; + [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max value to a range-restricted unsigned 16-bit integer Error: %@", err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000319_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted unsigned 16-bit integer value has not changed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted unsigned 16-bit integer value has not changed Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 200U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000320_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min valid value to a range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:100U]; + [cluster + writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a range-restricted unsigned 16-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000321_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted unsigned 16-bit integer value is at min valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted unsigned 16-bit integer value is at min valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 100U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000322_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max valid value to a range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1000U]; + [cluster + writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a range-restricted unsigned 16-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000323_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted unsigned 16-bit integer value is at max valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted unsigned 16-bit integer value is at max valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 1000U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000324_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write middle valid value to a range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:500U]; + [cluster + writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a range-restricted unsigned 16-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000325_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted unsigned 16-bit integer value is at mid valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted unsigned 16-bit integer value is at mid valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 500U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000326_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read range-restricted signed 8-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue charValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000327_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min value to a range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = [NSNumber numberWithChar:-128]; + [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min value to a range-restricted signed 8-bit integer Error: %@", err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000328_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-below-range value to a range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = [NSNumber numberWithChar:-41]; + [cluster + writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a range-restricted signed 8-bit integer Error: %@", + err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000329_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-above-range value to a range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = [NSNumber numberWithChar:51]; + [cluster + writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a range-restricted signed 8-bit integer Error: %@", + err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000330_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max value to a range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = [NSNumber numberWithChar:127]; + [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max value to a range-restricted signed 8-bit integer Error: %@", err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000331_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted signed 8-bit integer value has not changed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted signed 8-bit integer value has not changed Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue charValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000332_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min valid value to a range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = [NSNumber numberWithChar:-40]; + [cluster + writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a range-restricted signed 8-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000333_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted signed 8-bit integer value is at min valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted signed 8-bit integer value is at min valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue charValue], -40); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000334_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max valid value to a range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = [NSNumber numberWithChar:50]; + [cluster + writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a range-restricted signed 8-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000335_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted signed 8-bit integer value is at max valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted signed 8-bit integer value is at max valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue charValue], 50); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000336_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write middle valid value to a range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = [NSNumber numberWithChar:6]; + [cluster + writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a range-restricted signed 8-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000337_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted signed 8-bit integer value is at mid valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted signed 8-bit integer value is at mid valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue charValue], 6); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000338_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read range-restricted signed 16-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue shortValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000339_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min value to a range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = [NSNumber numberWithShort:-32768]; + [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min value to a range-restricted signed 16-bit integer Error: %@", err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000340_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-below-range value to a range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = [NSNumber numberWithShort:-151]; + [cluster + writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a range-restricted signed 16-bit integer Error: %@", + err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000341_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-above-range value to a range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = [NSNumber numberWithShort:201]; + [cluster + writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a range-restricted signed 16-bit integer Error: %@", + err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000342_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max value to a range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = [NSNumber numberWithShort:32767]; + [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max value to a range-restricted signed 16-bit integer Error: %@", err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000343_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted signed 16-bit integer value has not changed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted signed 16-bit integer value has not changed Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue shortValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000344_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min valid value to a range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = [NSNumber numberWithShort:-150]; + [cluster + writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a range-restricted signed 16-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000345_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted signed 16-bit integer value is at min valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted signed 16-bit integer value is at min valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue shortValue], -150); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000346_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max valid value to a range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = [NSNumber numberWithShort:200]; + [cluster + writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a range-restricted signed 16-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000347_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted signed 16-bit integer value is at max valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted signed 16-bit integer value is at max valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue shortValue], 200); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000348_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write middle valid value to a range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = [NSNumber numberWithShort:7]; + [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a range-restricted signed 16-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000349_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify range-restricted signed 16-bit integer value is at mid valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify range-restricted signed 16-bit integer value is at mid valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue shortValue], 7); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000350_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read nullable range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read nullable range-restricted unsigned 8-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedCharValue], 70); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000351_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min value to a nullable range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:0]; + [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min value to a nullable range-restricted unsigned 8-bit integer " + @"Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000352_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-below-range value to a nullable range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:19]; + [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a nullable range-restricted unsigned " + @"8-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000353_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-above-range value to a nullable range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:101]; + [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a nullable range-restricted unsigned " + @"8-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000354_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max value to a nullable range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:254]; + [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max value to a nullable range-restricted unsigned 8-bit integer " + @"Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000355_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted unsigned 8-bit integer value has not changed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value has not changed Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedCharValue], 70); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000356_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min valid value to a nullable range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:20]; + [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a nullable range-restricted unsigned 8-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000357_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted unsigned 8-bit integer value is at min valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at min valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedCharValue], 20); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000358_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max valid value to a nullable range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:100]; + [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a nullable range-restricted unsigned 8-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000359_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted unsigned 8-bit integer value is at max valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at max valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedCharValue], 100); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000360_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write middle valid value to a nullable range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:50]; + [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a nullable range-restricted unsigned 8-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000361_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted unsigned 8-bit integer value is at mid valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at mid valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedCharValue], 50); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000362_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write null value to a nullable range-restricted unsigned 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument = nil; + [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write null value to a nullable range-restricted unsigned 8-bit integer " + @"Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000363_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted unsigned 8-bit integer value is null"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is null Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue(actualValue == nil); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000364_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read nullable range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read nullable range-restricted unsigned 16-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedShortValue], 200U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000365_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min value to a nullable range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min value to a nullable range-restricted unsigned 16-bit integer " + @"Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000366_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-below-range value to a nullable range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:99U]; + [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a nullable range-restricted unsigned " + @"16-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000367_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-above-range value to a nullable range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1001U]; + [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a nullable range-restricted unsigned " + @"16-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000368_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max value to a nullable range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:65534U]; + [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max value to a nullable range-restricted unsigned 16-bit integer " + @"Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000369_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted unsigned 16-bit integer value has not changed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value has not changed Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedShortValue], 200U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000370_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min valid value to a nullable range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:100U]; + [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a nullable range-restricted unsigned 16-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000371_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted unsigned 16-bit integer value is at min valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at min valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedShortValue], 100U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000372_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max valid value to a nullable range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1000U]; + [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a nullable range-restricted unsigned 16-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000373_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted unsigned 16-bit integer value is at max valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at max valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedShortValue], 1000U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000374_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write middle valid value to a nullable range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:500U]; + [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a nullable range-restricted unsigned " + @"16-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000375_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted unsigned 16-bit integer value is at mid valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at mid valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedShortValue], 500U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000376_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write null value to a nullable range-restricted unsigned 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument = nil; + [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write null value to a nullable range-restricted unsigned 16-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000377_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted unsigned 16-bit integer value is null"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is null Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue(actualValue == nil); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000378_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read nullable range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read nullable range-restricted signed 8-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue charValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000379_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min value to a nullable range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:-127]; + [cluster + writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"Write min value to a nullable range-restricted signed 8-bit integer Error: %@", + err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000380_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-below-range value to a nullable range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:-41]; + [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a nullable range-restricted signed " + @"8-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000381_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-above-range value to a nullable range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:51]; + [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a nullable range-restricted signed " + @"8-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000382_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max value to a nullable range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:127]; + [cluster + writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"Write max value to a nullable range-restricted signed 8-bit integer Error: %@", + err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000383_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted signed 8-bit integer value has not changed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 8-bit integer value has not changed Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue charValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000384_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min valid value to a nullable range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:-40]; + [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a nullable range-restricted signed 8-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000385_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted signed 8-bit integer value is at min valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at min valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue charValue], -40); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000386_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max valid value to a nullable range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:50]; + [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a nullable range-restricted signed 8-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000387_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted signed 8-bit integer value is at max valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at max valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue charValue], 50); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000388_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write middle valid value to a nullable range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:6]; + [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a nullable range-restricted signed 8-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000389_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted signed 8-bit integer value is at mid valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at mid valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue charValue], 6); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000390_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write null value to a nullable range-restricted signed 8-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument = nil; + [cluster + writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"Write null value to a nullable range-restricted signed 8-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000391_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted signed 8-bit integer value is at null"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at null Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue(actualValue == nil); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000392_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read nullable range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read nullable range-restricted signed 16-bit integer Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue shortValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000393_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min value to a nullable range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:-32767]; + [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min value to a nullable range-restricted signed 16-bit integer " + @"Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000394_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-below-range value to a nullable range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:-151]; + [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a nullable range-restricted signed " + @"16-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000395_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write just-above-range value to a nullable range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:201]; + [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a nullable range-restricted signed " + @"16-bit integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000396_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max value to a nullable range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:32767]; + [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max value to a nullable range-restricted signed 16-bit integer " + @"Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000397_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted signed 16-bit integer value has not changed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 16-bit integer value has not changed Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue shortValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000398_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write min valid value to a nullable range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:-150]; + [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a nullable range-restricted signed 16-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000399_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted signed 16-bit integer value is at min valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at min valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue shortValue], -150); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000400_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write max valid value to a nullable range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:200]; + [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a nullable range-restricted signed 16-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000401_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted signed 16-bit integer value is at max valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at max valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue shortValue], 200); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000402_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write middle valid value to a nullable range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:7]; + [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a nullable range-restricted signed 16-bit " + @"integer Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000403_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted signed 16-bit integer value is at mid valid"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at mid valid Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue shortValue], 7); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000404_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write null value to a nullable range-restricted signed 16-bit integer"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument = nil; + [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write null value to a nullable range-restricted signed 16-bit integer " + @"Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000405_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Verify nullable range-restricted signed 16-bit integer value is null"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster + readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 16-bit integer value is null Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue(actualValue == nil); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTestSaveAs_000000_WaitForCommissionee { diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 52cd3a46642d82..2fff62c684da06 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -35477,6 +35477,520 @@ class TestCluster : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 301 : Check for list attribute report\n"); err = TestCheckForListAttributeReport_301(); break; + case 302: + ChipLogProgress(chipTool, " ***** Test Step 302 : Read range-restricted unsigned 8-bit integer\n"); + err = TestReadRangeRestrictedUnsigned8BitInteger_302(); + break; + case 303: + ChipLogProgress(chipTool, " ***** Test Step 303 : Write min value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_303(); + break; + case 304: + ChipLogProgress(chipTool, + " ***** Test Step 304 : Write just-below-range value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_304(); + break; + case 305: + ChipLogProgress(chipTool, + " ***** Test Step 305 : Write just-above-range value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_305(); + break; + case 306: + ChipLogProgress(chipTool, " ***** Test Step 306 : Write max value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_306(); + break; + case 307: + ChipLogProgress(chipTool, + " ***** Test Step 307 : Verify range-restricted unsigned 8-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_307(); + break; + case 308: + ChipLogProgress(chipTool, + " ***** Test Step 308 : Write min valid value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_308(); + break; + case 309: + ChipLogProgress(chipTool, + " ***** Test Step 309 : Verify range-restricted unsigned 8-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_309(); + break; + case 310: + ChipLogProgress(chipTool, + " ***** Test Step 310 : Write max valid value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_310(); + break; + case 311: + ChipLogProgress(chipTool, + " ***** Test Step 311 : Verify range-restricted unsigned 8-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_311(); + break; + case 312: + ChipLogProgress(chipTool, + " ***** Test Step 312 : Write middle valid value to a range-restricted unsigned 8-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_312(); + break; + case 313: + ChipLogProgress(chipTool, + " ***** Test Step 313 : Verify range-restricted unsigned 8-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_313(); + break; + case 314: + ChipLogProgress(chipTool, " ***** Test Step 314 : Read range-restricted unsigned 16-bit integer\n"); + err = TestReadRangeRestrictedUnsigned16BitInteger_314(); + break; + case 315: + ChipLogProgress(chipTool, " ***** Test Step 315 : Write min value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_315(); + break; + case 316: + ChipLogProgress(chipTool, + " ***** Test Step 316 : Write just-below-range value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_316(); + break; + case 317: + ChipLogProgress(chipTool, + " ***** Test Step 317 : Write just-above-range value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_317(); + break; + case 318: + ChipLogProgress(chipTool, " ***** Test Step 318 : Write max value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_318(); + break; + case 319: + ChipLogProgress(chipTool, + " ***** Test Step 319 : Verify range-restricted unsigned 16-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_319(); + break; + case 320: + ChipLogProgress(chipTool, + " ***** Test Step 320 : Write min valid value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_320(); + break; + case 321: + ChipLogProgress(chipTool, + " ***** Test Step 321 : Verify range-restricted unsigned 16-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_321(); + break; + case 322: + ChipLogProgress(chipTool, + " ***** Test Step 322 : Write max valid value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_322(); + break; + case 323: + ChipLogProgress(chipTool, + " ***** Test Step 323 : Verify range-restricted unsigned 16-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_323(); + break; + case 324: + ChipLogProgress(chipTool, + " ***** Test Step 324 : Write middle valid value to a range-restricted unsigned 16-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_324(); + break; + case 325: + ChipLogProgress(chipTool, + " ***** Test Step 325 : Verify range-restricted unsigned 16-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_325(); + break; + case 326: + ChipLogProgress(chipTool, " ***** Test Step 326 : Read range-restricted signed 8-bit integer\n"); + err = TestReadRangeRestrictedSigned8BitInteger_326(); + break; + case 327: + ChipLogProgress(chipTool, " ***** Test Step 327 : Write min value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedSigned8BitInteger_327(); + break; + case 328: + ChipLogProgress(chipTool, + " ***** Test Step 328 : Write just-below-range value to a range-restricted signed 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_328(); + break; + case 329: + ChipLogProgress(chipTool, + " ***** Test Step 329 : Write just-above-range value to a range-restricted signed 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_329(); + break; + case 330: + ChipLogProgress(chipTool, " ***** Test Step 330 : Write max value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedSigned8BitInteger_330(); + break; + case 331: + ChipLogProgress(chipTool, + " ***** Test Step 331 : Verify range-restricted signed 8-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_331(); + break; + case 332: + ChipLogProgress(chipTool, " ***** Test Step 332 : Write min valid value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_332(); + break; + case 333: + ChipLogProgress(chipTool, + " ***** Test Step 333 : Verify range-restricted signed 8-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_333(); + break; + case 334: + ChipLogProgress(chipTool, " ***** Test Step 334 : Write max valid value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_334(); + break; + case 335: + ChipLogProgress(chipTool, + " ***** Test Step 335 : Verify range-restricted signed 8-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_335(); + break; + case 336: + ChipLogProgress(chipTool, + " ***** Test Step 336 : Write middle valid value to a range-restricted signed 8-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_336(); + break; + case 337: + ChipLogProgress(chipTool, + " ***** Test Step 337 : Verify range-restricted signed 8-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_337(); + break; + case 338: + ChipLogProgress(chipTool, " ***** Test Step 338 : Read range-restricted signed 16-bit integer\n"); + err = TestReadRangeRestrictedSigned16BitInteger_338(); + break; + case 339: + ChipLogProgress(chipTool, " ***** Test Step 339 : Write min value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMinValueToARangeRestrictedSigned16BitInteger_339(); + break; + case 340: + ChipLogProgress(chipTool, + " ***** Test Step 340 : Write just-below-range value to a range-restricted signed 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_340(); + break; + case 341: + ChipLogProgress(chipTool, + " ***** Test Step 341 : Write just-above-range value to a range-restricted signed 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_341(); + break; + case 342: + ChipLogProgress(chipTool, " ***** Test Step 342 : Write max value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValueToARangeRestrictedSigned16BitInteger_342(); + break; + case 343: + ChipLogProgress(chipTool, + " ***** Test Step 343 : Verify range-restricted signed 16-bit integer value has not changed\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_343(); + break; + case 344: + ChipLogProgress(chipTool, " ***** Test Step 344 : Write min valid value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_344(); + break; + case 345: + ChipLogProgress(chipTool, + " ***** Test Step 345 : Verify range-restricted signed 16-bit integer value is at min valid\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_345(); + break; + case 346: + ChipLogProgress(chipTool, " ***** Test Step 346 : Write max valid value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_346(); + break; + case 347: + ChipLogProgress(chipTool, + " ***** Test Step 347 : Verify range-restricted signed 16-bit integer value is at max valid\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_347(); + break; + case 348: + ChipLogProgress(chipTool, + " ***** Test Step 348 : Write middle valid value to a range-restricted signed 16-bit integer\n"); + err = TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_348(); + break; + case 349: + ChipLogProgress(chipTool, + " ***** Test Step 349 : Verify range-restricted signed 16-bit integer value is at mid valid\n"); + err = TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_349(); + break; + case 350: + ChipLogProgress(chipTool, " ***** Test Step 350 : Read nullable range-restricted unsigned 8-bit integer\n"); + err = TestReadNullableRangeRestrictedUnsigned8BitInteger_350(); + break; + case 351: + ChipLogProgress(chipTool, + " ***** Test Step 351 : Write min value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_351(); + break; + case 352: + ChipLogProgress( + chipTool, + " ***** Test Step 352 : Write just-below-range value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_352(); + break; + case 353: + ChipLogProgress( + chipTool, + " ***** Test Step 353 : Write just-above-range value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_353(); + break; + case 354: + ChipLogProgress(chipTool, + " ***** Test Step 354 : Write max value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_354(); + break; + case 355: + ChipLogProgress( + chipTool, " ***** Test Step 355 : Verify nullable range-restricted unsigned 8-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_355(); + break; + case 356: + ChipLogProgress(chipTool, + " ***** Test Step 356 : Write min valid value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_356(); + break; + case 357: + ChipLogProgress( + chipTool, " ***** Test Step 357 : Verify nullable range-restricted unsigned 8-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_357(); + break; + case 358: + ChipLogProgress(chipTool, + " ***** Test Step 358 : Write max valid value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_358(); + break; + case 359: + ChipLogProgress( + chipTool, " ***** Test Step 359 : Verify nullable range-restricted unsigned 8-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_359(); + break; + case 360: + ChipLogProgress( + chipTool, + " ***** Test Step 360 : Write middle valid value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_360(); + break; + case 361: + ChipLogProgress( + chipTool, " ***** Test Step 361 : Verify nullable range-restricted unsigned 8-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_361(); + break; + case 362: + ChipLogProgress(chipTool, + " ***** Test Step 362 : Write null value to a nullable range-restricted unsigned 8-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_362(); + break; + case 363: + ChipLogProgress(chipTool, + " ***** Test Step 363 : Verify nullable range-restricted unsigned 8-bit integer value is null\n"); + err = TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_363(); + break; + case 364: + ChipLogProgress(chipTool, " ***** Test Step 364 : Read nullable range-restricted unsigned 16-bit integer\n"); + err = TestReadNullableRangeRestrictedUnsigned16BitInteger_364(); + break; + case 365: + ChipLogProgress(chipTool, + " ***** Test Step 365 : Write min value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_365(); + break; + case 366: + ChipLogProgress( + chipTool, + " ***** Test Step 366 : Write just-below-range value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_366(); + break; + case 367: + ChipLogProgress( + chipTool, + " ***** Test Step 367 : Write just-above-range value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_367(); + break; + case 368: + ChipLogProgress(chipTool, + " ***** Test Step 368 : Write max value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_368(); + break; + case 369: + ChipLogProgress( + chipTool, + " ***** Test Step 369 : Verify nullable range-restricted unsigned 16-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_369(); + break; + case 370: + ChipLogProgress( + chipTool, " ***** Test Step 370 : Write min valid value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_370(); + break; + case 371: + ChipLogProgress( + chipTool, + " ***** Test Step 371 : Verify nullable range-restricted unsigned 16-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_371(); + break; + case 372: + ChipLogProgress( + chipTool, " ***** Test Step 372 : Write max valid value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_372(); + break; + case 373: + ChipLogProgress( + chipTool, + " ***** Test Step 373 : Verify nullable range-restricted unsigned 16-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_373(); + break; + case 374: + ChipLogProgress( + chipTool, + " ***** Test Step 374 : Write middle valid value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_374(); + break; + case 375: + ChipLogProgress( + chipTool, + " ***** Test Step 375 : Verify nullable range-restricted unsigned 16-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_375(); + break; + case 376: + ChipLogProgress(chipTool, + " ***** Test Step 376 : Write null value to a nullable range-restricted unsigned 16-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_376(); + break; + case 377: + ChipLogProgress(chipTool, + " ***** Test Step 377 : Verify nullable range-restricted unsigned 16-bit integer value is null\n"); + err = TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_377(); + break; + case 378: + ChipLogProgress(chipTool, " ***** Test Step 378 : Read nullable range-restricted signed 8-bit integer\n"); + err = TestReadNullableRangeRestrictedSigned8BitInteger_378(); + break; + case 379: + ChipLogProgress(chipTool, + " ***** Test Step 379 : Write min value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_379(); + break; + case 380: + ChipLogProgress( + chipTool, + " ***** Test Step 380 : Write just-below-range value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_380(); + break; + case 381: + ChipLogProgress( + chipTool, + " ***** Test Step 381 : Write just-above-range value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_381(); + break; + case 382: + ChipLogProgress(chipTool, + " ***** Test Step 382 : Write max value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_382(); + break; + case 383: + ChipLogProgress(chipTool, + " ***** Test Step 383 : Verify nullable range-restricted signed 8-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_383(); + break; + case 384: + ChipLogProgress(chipTool, + " ***** Test Step 384 : Write min valid value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_384(); + break; + case 385: + ChipLogProgress(chipTool, + " ***** Test Step 385 : Verify nullable range-restricted signed 8-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_385(); + break; + case 386: + ChipLogProgress(chipTool, + " ***** Test Step 386 : Write max valid value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_386(); + break; + case 387: + ChipLogProgress(chipTool, + " ***** Test Step 387 : Verify nullable range-restricted signed 8-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_387(); + break; + case 388: + ChipLogProgress( + chipTool, " ***** Test Step 388 : Write middle valid value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_388(); + break; + case 389: + ChipLogProgress(chipTool, + " ***** Test Step 389 : Verify nullable range-restricted signed 8-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_389(); + break; + case 390: + ChipLogProgress(chipTool, + " ***** Test Step 390 : Write null value to a nullable range-restricted signed 8-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_390(); + break; + case 391: + ChipLogProgress(chipTool, + " ***** Test Step 391 : Verify nullable range-restricted signed 8-bit integer value is at null\n"); + err = TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_391(); + break; + case 392: + ChipLogProgress(chipTool, " ***** Test Step 392 : Read nullable range-restricted signed 16-bit integer\n"); + err = TestReadNullableRangeRestrictedSigned16BitInteger_392(); + break; + case 393: + ChipLogProgress(chipTool, + " ***** Test Step 393 : Write min value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_393(); + break; + case 394: + ChipLogProgress( + chipTool, + " ***** Test Step 394 : Write just-below-range value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_394(); + break; + case 395: + ChipLogProgress( + chipTool, + " ***** Test Step 395 : Write just-above-range value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_395(); + break; + case 396: + ChipLogProgress(chipTool, + " ***** Test Step 396 : Write max value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_396(); + break; + case 397: + ChipLogProgress( + chipTool, " ***** Test Step 397 : Verify nullable range-restricted signed 16-bit integer value has not changed\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_397(); + break; + case 398: + ChipLogProgress(chipTool, + " ***** Test Step 398 : Write min valid value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_398(); + break; + case 399: + ChipLogProgress( + chipTool, " ***** Test Step 399 : Verify nullable range-restricted signed 16-bit integer value is at min valid\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_399(); + break; + case 400: + ChipLogProgress(chipTool, + " ***** Test Step 400 : Write max valid value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_400(); + break; + case 401: + ChipLogProgress( + chipTool, " ***** Test Step 401 : Verify nullable range-restricted signed 16-bit integer value is at max valid\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_401(); + break; + case 402: + ChipLogProgress( + chipTool, " ***** Test Step 402 : Write middle valid value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_402(); + break; + case 403: + ChipLogProgress( + chipTool, " ***** Test Step 403 : Verify nullable range-restricted signed 16-bit integer value is at mid valid\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_403(); + break; + case 404: + ChipLogProgress(chipTool, + " ***** Test Step 404 : Write null value to a nullable range-restricted signed 16-bit integer\n"); + err = TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_404(); + break; + case 405: + ChipLogProgress(chipTool, + " ***** Test Step 405 : Verify nullable range-restricted signed 16-bit integer value is null\n"); + err = TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_405(); + break; } if (CHIP_NO_ERROR != err) @@ -35488,7 +36002,7 @@ class TestCluster : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 302; + const uint16_t mTestCount = 406; typedef void (*Test_TestCluster_list_int8u_ReportCallback)(void * context, const chip::app::DataModel::DecodableList & value); @@ -37875,3166 +38389,4111 @@ class TestCluster : public TestCommand bool mReceivedReport_301 = false; - // - // Tests methods - // + static void OnFailureCallback_302(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_302(status); + } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + static void OnSuccessCallback_302(void * context, uint8_t rangeRestrictedInt8u) { - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(); + (static_cast(context))->OnSuccessResponse_302(rangeRestrictedInt8u); } - CHIP_ERROR TestSendTestCommand_1() + static void OnFailureCallback_303(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; + (static_cast(context))->OnFailureResponse_303(status); + } - RequestType request; + static void OnSuccessCallback_303(void * context) { (static_cast(context))->OnSuccessResponse_303(); } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_1(); - }; + static void OnFailureCallback_304(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_304(status); + } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_1(status); - }; + static void OnSuccessCallback_304(void * context) { (static_cast(context))->OnSuccessResponse_304(); } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + static void OnFailureCallback_305(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_305(status); } - void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_1() { NextTest(); } + static void OnSuccessCallback_305(void * context) { (static_cast(context))->OnSuccessResponse_305(); } - CHIP_ERROR TestSendTestNotHandledCommand_2() + static void OnFailureCallback_306(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type; - - RequestType request; + (static_cast(context))->OnFailureResponse_306(status); + } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_2(); - }; + static void OnSuccessCallback_306(void * context) { (static_cast(context))->OnSuccessResponse_306(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); - }; + static void OnFailureCallback_307(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_307(status); + } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + static void OnSuccessCallback_307(void * context, uint8_t rangeRestrictedInt8u) + { + (static_cast(context))->OnSuccessResponse_307(rangeRestrictedInt8u); } - void OnFailureResponse_2(EmberAfStatus status) + static void OnFailureCallback_308(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); + (static_cast(context))->OnFailureResponse_308(status); } - void OnSuccessResponse_2() { ThrowSuccessResponse(); } + static void OnSuccessCallback_308(void * context) { (static_cast(context))->OnSuccessResponse_308(); } - CHIP_ERROR TestSendTestSpecificCommand_3() + static void OnFailureCallback_309(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestSpecific::Type; - - RequestType request; + (static_cast(context))->OnFailureResponse_309(status); + } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_3(data.returnValue); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_3(status); - }; + static void OnSuccessCallback_309(void * context, uint8_t rangeRestrictedInt8u) + { + (static_cast(context))->OnSuccessResponse_309(rangeRestrictedInt8u); + } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + static void OnFailureCallback_310(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_310(status); } - void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_310(void * context) { (static_cast(context))->OnSuccessResponse_310(); } - void OnSuccessResponse_3(uint8_t returnValue) + static void OnFailureCallback_311(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("returnValue", returnValue, 7)); + (static_cast(context))->OnFailureResponse_311(status); + } - NextTest(); + static void OnSuccessCallback_311(void * context, uint8_t rangeRestrictedInt8u) + { + (static_cast(context))->OnSuccessResponse_311(rangeRestrictedInt8u); } - CHIP_ERROR TestSendTestAddArgumentsCommand_4() + static void OnFailureCallback_312(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; + (static_cast(context))->OnFailureResponse_312(status); + } - RequestType request; - request.arg1 = 3; - request.arg2 = 17; + static void OnSuccessCallback_312(void * context) { (static_cast(context))->OnSuccessResponse_312(); } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_4(data.returnValue); - }; + static void OnFailureCallback_313(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_313(status); + } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_4(status); - }; + static void OnSuccessCallback_313(void * context, uint8_t rangeRestrictedInt8u) + { + (static_cast(context))->OnSuccessResponse_313(rangeRestrictedInt8u); + } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + static void OnFailureCallback_314(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_314(status); } - void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_314(void * context, uint16_t rangeRestrictedInt16u) + { + (static_cast(context))->OnSuccessResponse_314(rangeRestrictedInt16u); + } - void OnSuccessResponse_4(uint8_t returnValue) + static void OnFailureCallback_315(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("returnValue", returnValue, 20)); + (static_cast(context))->OnFailureResponse_315(status); + } - NextTest(); + static void OnSuccessCallback_315(void * context) { (static_cast(context))->OnSuccessResponse_315(); } + + static void OnFailureCallback_316(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_316(status); } - CHIP_ERROR TestSendFailingTestAddArgumentsCommand_5() + static void OnSuccessCallback_316(void * context) { (static_cast(context))->OnSuccessResponse_316(); } + + static void OnFailureCallback_317(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; + (static_cast(context))->OnFailureResponse_317(status); + } - RequestType request; - request.arg1 = 250; - request.arg2 = 6; + static void OnSuccessCallback_317(void * context) { (static_cast(context))->OnSuccessResponse_317(); } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_5(data.returnValue); - }; + static void OnFailureCallback_318(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_318(status); + } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_5(status); - }; + static void OnSuccessCallback_318(void * context) { (static_cast(context))->OnSuccessResponse_318(); } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + static void OnFailureCallback_319(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_319(status); } - void OnFailureResponse_5(EmberAfStatus status) + static void OnSuccessCallback_319(void * context, uint16_t rangeRestrictedInt16u) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); + (static_cast(context))->OnSuccessResponse_319(rangeRestrictedInt16u); } - void OnSuccessResponse_5(uint8_t returnValue) { ThrowSuccessResponse(); } + static void OnFailureCallback_320(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_320(status); + } - CHIP_ERROR TestReadAttributeBooleanDefaultValue_6() + static void OnSuccessCallback_320(void * context) { (static_cast(context))->OnSuccessResponse_320(); } + + static void OnFailureCallback_321(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_321(status); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_6, OnFailureCallback_6)); - return CHIP_NO_ERROR; + static void OnSuccessCallback_321(void * context, uint16_t rangeRestrictedInt16u) + { + (static_cast(context))->OnSuccessResponse_321(rangeRestrictedInt16u); } - void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnFailureCallback_322(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_322(status); + } - void OnSuccessResponse_6(bool boolean) + static void OnSuccessCallback_322(void * context) { (static_cast(context))->OnSuccessResponse_322(); } + + static void OnFailureCallback_323(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("boolean", boolean, 0)); + (static_cast(context))->OnFailureResponse_323(status); + } - NextTest(); + static void OnSuccessCallback_323(void * context, uint16_t rangeRestrictedInt16u) + { + (static_cast(context))->OnSuccessResponse_323(rangeRestrictedInt16u); } - CHIP_ERROR TestWriteAttributeBooleanTrue_7() + static void OnFailureCallback_324(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_324(status); + } - bool booleanArgument; - booleanArgument = 1; + static void OnSuccessCallback_324(void * context) { (static_cast(context))->OnSuccessResponse_324(); } - ReturnErrorOnFailure(cluster.WriteAttribute( - booleanArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); - return CHIP_NO_ERROR; + static void OnFailureCallback_325(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_325(status); } - void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_325(void * context, uint16_t rangeRestrictedInt16u) + { + (static_cast(context))->OnSuccessResponse_325(rangeRestrictedInt16u); + } - void OnSuccessResponse_7() { NextTest(); } + static void OnFailureCallback_326(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_326(status); + } - CHIP_ERROR TestReadAttributeBooleanTrue_8() + static void OnSuccessCallback_326(void * context, int8_t rangeRestrictedInt8s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_326(rangeRestrictedInt8s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; + static void OnFailureCallback_327(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_327(status); } - void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_327(void * context) { (static_cast(context))->OnSuccessResponse_327(); } - void OnSuccessResponse_8(bool boolean) + static void OnFailureCallback_328(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("boolean", boolean, 1)); - - NextTest(); + (static_cast(context))->OnFailureResponse_328(status); } - CHIP_ERROR TestWriteAttributeBooleanFalse_9() + static void OnSuccessCallback_328(void * context) { (static_cast(context))->OnSuccessResponse_328(); } + + static void OnFailureCallback_329(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_329(status); + } - bool booleanArgument; - booleanArgument = 0; + static void OnSuccessCallback_329(void * context) { (static_cast(context))->OnSuccessResponse_329(); } - ReturnErrorOnFailure(cluster.WriteAttribute( - booleanArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); - return CHIP_NO_ERROR; + static void OnFailureCallback_330(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_330(status); } - void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_330(void * context) { (static_cast(context))->OnSuccessResponse_330(); } - void OnSuccessResponse_9() { NextTest(); } + static void OnFailureCallback_331(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_331(status); + } - CHIP_ERROR TestReadAttributeBooleanFalse_10() + static void OnSuccessCallback_331(void * context, int8_t rangeRestrictedInt8s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_331(rangeRestrictedInt8s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; + static void OnFailureCallback_332(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_332(status); } - void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_332(void * context) { (static_cast(context))->OnSuccessResponse_332(); } - void OnSuccessResponse_10(bool boolean) + static void OnFailureCallback_333(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("boolean", boolean, 0)); - - NextTest(); + (static_cast(context))->OnFailureResponse_333(status); } - CHIP_ERROR TestReadAttributeBitmap8DefaultValue_11() + static void OnSuccessCallback_333(void * context, int8_t rangeRestrictedInt8s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_333(rangeRestrictedInt8s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_11, OnFailureCallback_11)); - return CHIP_NO_ERROR; + static void OnFailureCallback_334(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_334(status); } - void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_334(void * context) { (static_cast(context))->OnSuccessResponse_334(); } - void OnSuccessResponse_11(uint8_t bitmap8) + static void OnFailureCallback_335(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap8", bitmap8, 0)); + (static_cast(context))->OnFailureResponse_335(status); + } - NextTest(); + static void OnSuccessCallback_335(void * context, int8_t rangeRestrictedInt8s) + { + (static_cast(context))->OnSuccessResponse_335(rangeRestrictedInt8s); } - CHIP_ERROR TestWriteAttributeBitmap8MaxValue_12() + static void OnFailureCallback_336(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_336(status); + } - uint8_t bitmap8Argument; - bitmap8Argument = 255; + static void OnSuccessCallback_336(void * context) { (static_cast(context))->OnSuccessResponse_336(); } - ReturnErrorOnFailure(cluster.WriteAttribute( - bitmap8Argument, this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; + static void OnFailureCallback_337(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_337(status); } - void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_337(void * context, int8_t rangeRestrictedInt8s) + { + (static_cast(context))->OnSuccessResponse_337(rangeRestrictedInt8s); + } - void OnSuccessResponse_12() { NextTest(); } + static void OnFailureCallback_338(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_338(status); + } - CHIP_ERROR TestReadAttributeBitmap8MaxValue_13() + static void OnSuccessCallback_338(void * context, int16_t rangeRestrictedInt16s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_338(rangeRestrictedInt16s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; + static void OnFailureCallback_339(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_339(status); } - void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_339(void * context) { (static_cast(context))->OnSuccessResponse_339(); } - void OnSuccessResponse_13(uint8_t bitmap8) + static void OnFailureCallback_340(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap8", bitmap8, 255)); - - NextTest(); + (static_cast(context))->OnFailureResponse_340(status); } - CHIP_ERROR TestWriteAttributeBitmap8MinValue_14() + static void OnSuccessCallback_340(void * context) { (static_cast(context))->OnSuccessResponse_340(); } + + static void OnFailureCallback_341(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_341(status); + } - uint8_t bitmap8Argument; - bitmap8Argument = 0; + static void OnSuccessCallback_341(void * context) { (static_cast(context))->OnSuccessResponse_341(); } - ReturnErrorOnFailure(cluster.WriteAttribute( - bitmap8Argument, this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; + static void OnFailureCallback_342(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_342(status); } - void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_342(void * context) { (static_cast(context))->OnSuccessResponse_342(); } - void OnSuccessResponse_14() { NextTest(); } + static void OnFailureCallback_343(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_343(status); + } - CHIP_ERROR TestReadAttributeBitmap8MinValue_15() + static void OnSuccessCallback_343(void * context, int16_t rangeRestrictedInt16s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_343(rangeRestrictedInt16s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_15, OnFailureCallback_15)); - return CHIP_NO_ERROR; + static void OnFailureCallback_344(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_344(status); } - void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_344(void * context) { (static_cast(context))->OnSuccessResponse_344(); } - void OnSuccessResponse_15(uint8_t bitmap8) + static void OnFailureCallback_345(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap8", bitmap8, 0)); - - NextTest(); + (static_cast(context))->OnFailureResponse_345(status); } - CHIP_ERROR TestReadAttributeBitmap16DefaultValue_16() + static void OnSuccessCallback_345(void * context, int16_t rangeRestrictedInt16s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_345(rangeRestrictedInt16s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; + static void OnFailureCallback_346(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_346(status); } - void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_346(void * context) { (static_cast(context))->OnSuccessResponse_346(); } - void OnSuccessResponse_16(uint16_t bitmap16) + static void OnFailureCallback_347(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap16", bitmap16, 0U)); + (static_cast(context))->OnFailureResponse_347(status); + } - NextTest(); + static void OnSuccessCallback_347(void * context, int16_t rangeRestrictedInt16s) + { + (static_cast(context))->OnSuccessResponse_347(rangeRestrictedInt16s); } - CHIP_ERROR TestWriteAttributeBitmap16MaxValue_17() + static void OnFailureCallback_348(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_348(status); + } - uint16_t bitmap16Argument; - bitmap16Argument = 65535U; + static void OnSuccessCallback_348(void * context) { (static_cast(context))->OnSuccessResponse_348(); } - ReturnErrorOnFailure(cluster.WriteAttribute( - bitmap16Argument, this, OnSuccessCallback_17, OnFailureCallback_17)); - return CHIP_NO_ERROR; + static void OnFailureCallback_349(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_349(status); } - void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_17() { NextTest(); } - - CHIP_ERROR TestReadAttributeBitmap16MaxValue_18() + static void OnSuccessCallback_349(void * context, int16_t rangeRestrictedInt16s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_349(rangeRestrictedInt16s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_18, OnFailureCallback_18)); - return CHIP_NO_ERROR; + static void OnFailureCallback_350(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_350(status); } - void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_350(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + { + (static_cast(context))->OnSuccessResponse_350(nullableRangeRestrictedInt8u); + } - void OnSuccessResponse_18(uint16_t bitmap16) + static void OnFailureCallback_351(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap16", bitmap16, 65535U)); + (static_cast(context))->OnFailureResponse_351(status); + } - NextTest(); + static void OnSuccessCallback_351(void * context) { (static_cast(context))->OnSuccessResponse_351(); } + + static void OnFailureCallback_352(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_352(status); } - CHIP_ERROR TestWriteAttributeBitmap16MinValue_19() + static void OnSuccessCallback_352(void * context) { (static_cast(context))->OnSuccessResponse_352(); } + + static void OnFailureCallback_353(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_353(status); + } - uint16_t bitmap16Argument; - bitmap16Argument = 0U; + static void OnSuccessCallback_353(void * context) { (static_cast(context))->OnSuccessResponse_353(); } - ReturnErrorOnFailure(cluster.WriteAttribute( - bitmap16Argument, this, OnSuccessCallback_19, OnFailureCallback_19)); - return CHIP_NO_ERROR; + static void OnFailureCallback_354(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_354(status); } - void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_354(void * context) { (static_cast(context))->OnSuccessResponse_354(); } - void OnSuccessResponse_19() { NextTest(); } + static void OnFailureCallback_355(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_355(status); + } - CHIP_ERROR TestReadAttributeBitmap16MinValue_20() + static void OnSuccessCallback_355(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_355(nullableRangeRestrictedInt8u); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; + static void OnFailureCallback_356(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_356(status); } - void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_356(void * context) { (static_cast(context))->OnSuccessResponse_356(); } - void OnSuccessResponse_20(uint16_t bitmap16) + static void OnFailureCallback_357(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap16", bitmap16, 0U)); - - NextTest(); + (static_cast(context))->OnFailureResponse_357(status); } - CHIP_ERROR TestReadAttributeBitmap32DefaultValue_21() + static void OnSuccessCallback_357(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_357(nullableRangeRestrictedInt8u); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_21, OnFailureCallback_21)); - return CHIP_NO_ERROR; + static void OnFailureCallback_358(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_358(status); } - void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_358(void * context) { (static_cast(context))->OnSuccessResponse_358(); } - void OnSuccessResponse_21(uint32_t bitmap32) + static void OnFailureCallback_359(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap32", bitmap32, 0UL)); - - NextTest(); + (static_cast(context))->OnFailureResponse_359(status); } - CHIP_ERROR TestWriteAttributeBitmap32MaxValue_22() + static void OnSuccessCallback_359(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint32_t bitmap32Argument; - bitmap32Argument = 4294967295UL; + (static_cast(context))->OnSuccessResponse_359(nullableRangeRestrictedInt8u); + } - ReturnErrorOnFailure(cluster.WriteAttribute( - bitmap32Argument, this, OnSuccessCallback_22, OnFailureCallback_22)); - return CHIP_NO_ERROR; + static void OnFailureCallback_360(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_360(status); } - void OnFailureResponse_22(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_360(void * context) { (static_cast(context))->OnSuccessResponse_360(); } - void OnSuccessResponse_22() { NextTest(); } + static void OnFailureCallback_361(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_361(status); + } - CHIP_ERROR TestReadAttributeBitmap32MaxValue_23() + static void OnSuccessCallback_361(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_361(nullableRangeRestrictedInt8u); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_23, OnFailureCallback_23)); - return CHIP_NO_ERROR; + static void OnFailureCallback_362(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_362(status); } - void OnFailureResponse_23(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_362(void * context) { (static_cast(context))->OnSuccessResponse_362(); } - void OnSuccessResponse_23(uint32_t bitmap32) + static void OnFailureCallback_363(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap32", bitmap32, 4294967295UL)); - - NextTest(); + (static_cast(context))->OnFailureResponse_363(status); } - CHIP_ERROR TestWriteAttributeBitmap32MinValue_24() + static void OnSuccessCallback_363(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_363(nullableRangeRestrictedInt8u); + } - uint32_t bitmap32Argument; - bitmap32Argument = 0UL; + static void OnFailureCallback_364(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_364(status); + } - ReturnErrorOnFailure(cluster.WriteAttribute( - bitmap32Argument, this, OnSuccessCallback_24, OnFailureCallback_24)); - return CHIP_NO_ERROR; + static void OnSuccessCallback_364(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + { + (static_cast(context))->OnSuccessResponse_364(nullableRangeRestrictedInt16u); } - void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnFailureCallback_365(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_365(status); + } - void OnSuccessResponse_24() { NextTest(); } + static void OnSuccessCallback_365(void * context) { (static_cast(context))->OnSuccessResponse_365(); } - CHIP_ERROR TestReadAttributeBitmap32MinValue_25() + static void OnFailureCallback_366(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_366(status); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_25, OnFailureCallback_25)); - return CHIP_NO_ERROR; + static void OnSuccessCallback_366(void * context) { (static_cast(context))->OnSuccessResponse_366(); } + + static void OnFailureCallback_367(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_367(status); } - void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_367(void * context) { (static_cast(context))->OnSuccessResponse_367(); } - void OnSuccessResponse_25(uint32_t bitmap32) + static void OnFailureCallback_368(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap32", bitmap32, 0UL)); + (static_cast(context))->OnFailureResponse_368(status); + } - NextTest(); + static void OnSuccessCallback_368(void * context) { (static_cast(context))->OnSuccessResponse_368(); } + + static void OnFailureCallback_369(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_369(status); } - CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26() + static void OnSuccessCallback_369(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_369(nullableRangeRestrictedInt16u); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_26, OnFailureCallback_26)); - return CHIP_NO_ERROR; + static void OnFailureCallback_370(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_370(status); } - void OnFailureResponse_26(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_370(void * context) { (static_cast(context))->OnSuccessResponse_370(); } - void OnSuccessResponse_26(uint64_t bitmap64) + static void OnFailureCallback_371(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap64", bitmap64, 0ULL)); - - NextTest(); + (static_cast(context))->OnFailureResponse_371(status); } - CHIP_ERROR TestWriteAttributeBitmap64MaxValue_27() + static void OnSuccessCallback_371(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint64_t bitmap64Argument; - bitmap64Argument = 18446744073709551615ULL; + (static_cast(context))->OnSuccessResponse_371(nullableRangeRestrictedInt16u); + } - ReturnErrorOnFailure(cluster.WriteAttribute( - bitmap64Argument, this, OnSuccessCallback_27, OnFailureCallback_27)); - return CHIP_NO_ERROR; + static void OnFailureCallback_372(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_372(status); } - void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_372(void * context) { (static_cast(context))->OnSuccessResponse_372(); } - void OnSuccessResponse_27() { NextTest(); } + static void OnFailureCallback_373(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_373(status); + } - CHIP_ERROR TestReadAttributeBitmap64MaxValue_28() + static void OnSuccessCallback_373(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_373(nullableRangeRestrictedInt16u); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_28, OnFailureCallback_28)); - return CHIP_NO_ERROR; + static void OnFailureCallback_374(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_374(status); } - void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_374(void * context) { (static_cast(context))->OnSuccessResponse_374(); } - void OnSuccessResponse_28(uint64_t bitmap64) + static void OnFailureCallback_375(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap64", bitmap64, 18446744073709551615ULL)); + (static_cast(context))->OnFailureResponse_375(status); + } - NextTest(); + static void OnSuccessCallback_375(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + { + (static_cast(context))->OnSuccessResponse_375(nullableRangeRestrictedInt16u); } - CHIP_ERROR TestWriteAttributeBitmap64MinValue_29() + static void OnFailureCallback_376(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_376(status); + } - uint64_t bitmap64Argument; - bitmap64Argument = 0ULL; + static void OnSuccessCallback_376(void * context) { (static_cast(context))->OnSuccessResponse_376(); } - ReturnErrorOnFailure(cluster.WriteAttribute( - bitmap64Argument, this, OnSuccessCallback_29, OnFailureCallback_29)); - return CHIP_NO_ERROR; + static void OnFailureCallback_377(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_377(status); } - void OnFailureResponse_29(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_377(void * context, + const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + { + (static_cast(context))->OnSuccessResponse_377(nullableRangeRestrictedInt16u); + } - void OnSuccessResponse_29() { NextTest(); } + static void OnFailureCallback_378(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_378(status); + } - CHIP_ERROR TestReadAttributeBitmap64MinValue_30() + static void OnSuccessCallback_378(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_378(nullableRangeRestrictedInt8s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_30, OnFailureCallback_30)); - return CHIP_NO_ERROR; + static void OnFailureCallback_379(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_379(status); } - void OnFailureResponse_30(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_379(void * context) { (static_cast(context))->OnSuccessResponse_379(); } - void OnSuccessResponse_30(uint64_t bitmap64) + static void OnFailureCallback_380(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("bitmap64", bitmap64, 0ULL)); - - NextTest(); + (static_cast(context))->OnFailureResponse_380(status); } - CHIP_ERROR TestReadAttributeInt8uDefaultValue_31() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + static void OnSuccessCallback_380(void * context) { (static_cast(context))->OnSuccessResponse_380(); } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_31, OnFailureCallback_31)); - return CHIP_NO_ERROR; + static void OnFailureCallback_381(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_381(status); } - void OnFailureResponse_31(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_381(void * context) { (static_cast(context))->OnSuccessResponse_381(); } - void OnSuccessResponse_31(uint8_t int8u) + static void OnFailureCallback_382(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("int8u", int8u, 0)); - - NextTest(); + (static_cast(context))->OnFailureResponse_382(status); } - CHIP_ERROR TestWriteAttributeInt8uMaxValue_32() + static void OnSuccessCallback_382(void * context) { (static_cast(context))->OnSuccessResponse_382(); } + + static void OnFailureCallback_383(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_383(status); + } - uint8_t int8uArgument; - int8uArgument = 255; + static void OnSuccessCallback_383(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + { + (static_cast(context))->OnSuccessResponse_383(nullableRangeRestrictedInt8s); + } - ReturnErrorOnFailure(cluster.WriteAttribute( - int8uArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); - return CHIP_NO_ERROR; + static void OnFailureCallback_384(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_384(status); } - void OnFailureResponse_32(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_384(void * context) { (static_cast(context))->OnSuccessResponse_384(); } - void OnSuccessResponse_32() { NextTest(); } + static void OnFailureCallback_385(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_385(status); + } - CHIP_ERROR TestReadAttributeInt8uMaxValue_33() + static void OnSuccessCallback_385(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_385(nullableRangeRestrictedInt8s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_33, OnFailureCallback_33)); - return CHIP_NO_ERROR; + static void OnFailureCallback_386(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_386(status); } - void OnFailureResponse_33(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_386(void * context) { (static_cast(context))->OnSuccessResponse_386(); } - void OnSuccessResponse_33(uint8_t int8u) + static void OnFailureCallback_387(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("int8u", int8u, 255)); + (static_cast(context))->OnFailureResponse_387(status); + } - NextTest(); + static void OnSuccessCallback_387(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + { + (static_cast(context))->OnSuccessResponse_387(nullableRangeRestrictedInt8s); } - CHIP_ERROR TestWriteAttributeInt8uMinValue_34() + static void OnFailureCallback_388(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_388(status); + } - uint8_t int8uArgument; - int8uArgument = 0; + static void OnSuccessCallback_388(void * context) { (static_cast(context))->OnSuccessResponse_388(); } - ReturnErrorOnFailure(cluster.WriteAttribute( - int8uArgument, this, OnSuccessCallback_34, OnFailureCallback_34)); - return CHIP_NO_ERROR; + static void OnFailureCallback_389(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_389(status); } - void OnFailureResponse_34(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_34() { NextTest(); } - - CHIP_ERROR TestReadAttributeInt8uMinValue_35() + static void OnSuccessCallback_389(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_389(nullableRangeRestrictedInt8s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_35, OnFailureCallback_35)); - return CHIP_NO_ERROR; + static void OnFailureCallback_390(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_390(status); } - void OnFailureResponse_35(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_390(void * context) { (static_cast(context))->OnSuccessResponse_390(); } - void OnSuccessResponse_35(uint8_t int8u) + static void OnFailureCallback_391(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("int8u", int8u, 0)); - - NextTest(); + (static_cast(context))->OnFailureResponse_391(status); } - CHIP_ERROR TestReadAttributeInt16uDefaultValue_36() + static void OnSuccessCallback_391(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_36, OnFailureCallback_36)); - return CHIP_NO_ERROR; + (static_cast(context))->OnSuccessResponse_391(nullableRangeRestrictedInt8s); } - void OnFailureResponse_36(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_36(uint16_t int16u) + static void OnFailureCallback_392(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("int16u", int16u, 0U)); + (static_cast(context))->OnFailureResponse_392(status); + } - NextTest(); + static void OnSuccessCallback_392(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + { + (static_cast(context))->OnSuccessResponse_392(nullableRangeRestrictedInt16s); } - CHIP_ERROR TestWriteAttributeInt16uMaxValue_37() + static void OnFailureCallback_393(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_393(status); + } - uint16_t int16uArgument; - int16uArgument = 65535U; + static void OnSuccessCallback_393(void * context) { (static_cast(context))->OnSuccessResponse_393(); } - ReturnErrorOnFailure(cluster.WriteAttribute( - int16uArgument, this, OnSuccessCallback_37, OnFailureCallback_37)); - return CHIP_NO_ERROR; + static void OnFailureCallback_394(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_394(status); } - void OnFailureResponse_37(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_37() { NextTest(); } + static void OnSuccessCallback_394(void * context) { (static_cast(context))->OnSuccessResponse_394(); } - CHIP_ERROR TestReadAttributeInt16uMaxValue_38() + static void OnFailureCallback_395(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_38, OnFailureCallback_38)); - return CHIP_NO_ERROR; + (static_cast(context))->OnFailureResponse_395(status); } - void OnFailureResponse_38(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_395(void * context) { (static_cast(context))->OnSuccessResponse_395(); } - void OnSuccessResponse_38(uint16_t int16u) + static void OnFailureCallback_396(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("int16u", int16u, 65535U)); - - NextTest(); + (static_cast(context))->OnFailureResponse_396(status); } - CHIP_ERROR TestWriteAttributeInt16uMinValue_39() + static void OnSuccessCallback_396(void * context) { (static_cast(context))->OnSuccessResponse_396(); } + + static void OnFailureCallback_397(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_397(status); + } - uint16_t int16uArgument; - int16uArgument = 0U; + static void OnSuccessCallback_397(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + { + (static_cast(context))->OnSuccessResponse_397(nullableRangeRestrictedInt16s); + } - ReturnErrorOnFailure(cluster.WriteAttribute( - int16uArgument, this, OnSuccessCallback_39, OnFailureCallback_39)); - return CHIP_NO_ERROR; + static void OnFailureCallback_398(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_398(status); } - void OnFailureResponse_39(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_398(void * context) { (static_cast(context))->OnSuccessResponse_398(); } - void OnSuccessResponse_39() { NextTest(); } + static void OnFailureCallback_399(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_399(status); + } - CHIP_ERROR TestReadAttributeInt16uMinValue_40() + static void OnSuccessCallback_399(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_399(nullableRangeRestrictedInt16s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_40, OnFailureCallback_40)); - return CHIP_NO_ERROR; + static void OnFailureCallback_400(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_400(status); } - void OnFailureResponse_40(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_400(void * context) { (static_cast(context))->OnSuccessResponse_400(); } - void OnSuccessResponse_40(uint16_t int16u) + static void OnFailureCallback_401(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("int16u", int16u, 0U)); - - NextTest(); + (static_cast(context))->OnFailureResponse_401(status); } - CHIP_ERROR TestReadAttributeInt32uDefaultValue_41() + static void OnSuccessCallback_401(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnSuccessResponse_401(nullableRangeRestrictedInt16s); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_41, OnFailureCallback_41)); - return CHIP_NO_ERROR; + static void OnFailureCallback_402(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_402(status); } - void OnFailureResponse_41(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnSuccessCallback_402(void * context) { (static_cast(context))->OnSuccessResponse_402(); } - void OnSuccessResponse_41(uint32_t int32u) + static void OnFailureCallback_403(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("int32u", int32u, 0UL)); - - NextTest(); + (static_cast(context))->OnFailureResponse_403(status); } - CHIP_ERROR TestWriteAttributeInt32uMaxValue_42() + static void OnSuccessCallback_403(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint32_t int32uArgument; - int32uArgument = 4294967295UL; - - ReturnErrorOnFailure(cluster.WriteAttribute( - int32uArgument, this, OnSuccessCallback_42, OnFailureCallback_42)); - return CHIP_NO_ERROR; + (static_cast(context))->OnSuccessResponse_403(nullableRangeRestrictedInt16s); } - void OnFailureResponse_42(EmberAfStatus status) { ThrowFailureResponse(); } + static void OnFailureCallback_404(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_404(status); + } - void OnSuccessResponse_42() { NextTest(); } + static void OnSuccessCallback_404(void * context) { (static_cast(context))->OnSuccessResponse_404(); } - CHIP_ERROR TestReadAttributeInt32uMaxValue_43() + static void OnFailureCallback_405(void * context, EmberAfStatus status) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + (static_cast(context))->OnFailureResponse_405(status); + } - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_43, OnFailureCallback_43)); - return CHIP_NO_ERROR; + static void OnSuccessCallback_405(void * context, const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) + { + (static_cast(context))->OnSuccessResponse_405(nullableRangeRestrictedInt16s); } - void OnFailureResponse_43(EmberAfStatus status) { ThrowFailureResponse(); } + // + // Tests methods + // - void OnSuccessResponse_43(uint32_t int32u) + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - VerifyOrReturn(CheckValue("int32u", int32u, 4294967295UL)); - - NextTest(); + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); } - CHIP_ERROR TestWriteAttributeInt32uMinValue_44() + CHIP_ERROR TestSendTestCommand_1() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; - uint32_t int32uArgument; - int32uArgument = 0UL; + RequestType request; - ReturnErrorOnFailure(cluster.WriteAttribute( - int32uArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_1(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_1(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_44(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_44() { NextTest(); } + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32uMinValue_45() + CHIP_ERROR TestSendTestNotHandledCommand_2() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type; - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_45, OnFailureCallback_45)); + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_2(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_2(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_45(uint32_t int32u) + void OnFailureResponse_2(EmberAfStatus status) { - VerifyOrReturn(CheckValue("int32u", int32u, 0UL)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); } - CHIP_ERROR TestReadAttributeInt64uDefaultValue_46() + void OnSuccessResponse_2() { ThrowSuccessResponse(); } + + CHIP_ERROR TestSendTestSpecificCommand_3() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + using RequestType = chip::app::Clusters::TestCluster::Commands::TestSpecific::Type; - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_46, OnFailureCallback_46)); + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_3(data.returnValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_3(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_46(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_46(uint64_t int64u) + void OnSuccessResponse_3(uint8_t returnValue) { - VerifyOrReturn(CheckValue("int64u", int64u, 0ULL)); + VerifyOrReturn(CheckValue("returnValue", returnValue, 7)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt64uMaxValue_47() + CHIP_ERROR TestSendTestAddArgumentsCommand_4() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; - uint64_t int64uArgument; - int64uArgument = 18446744073709551615ULL; + RequestType request; + request.arg1 = 3; + request.arg2 = 17; - ReturnErrorOnFailure(cluster.WriteAttribute( - int64uArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_4(data.returnValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_4(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_47(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_47() { NextTest(); } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - CHIP_ERROR TestReadAttributeInt64uMaxValue_48() + void OnSuccessResponse_4(uint8_t returnValue) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + VerifyOrReturn(CheckValue("returnValue", returnValue, 20)); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_48, OnFailureCallback_48)); - return CHIP_NO_ERROR; + NextTest(); } - void OnFailureResponse_48(EmberAfStatus status) { ThrowFailureResponse(); } + CHIP_ERROR TestSendFailingTestAddArgumentsCommand_5() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; - void OnSuccessResponse_48(uint64_t int64u) + RequestType request; + request.arg1 = 250; + request.arg2 = 6; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_5(data.returnValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_5(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(EmberAfStatus status) { - VerifyOrReturn(CheckValue("int64u", int64u, 18446744073709551615ULL)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + } + + void OnSuccessResponse_5(uint8_t returnValue) { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeBooleanDefaultValue_6() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_6(bool boolean) + { + VerifyOrReturn(CheckValue("boolean", boolean, 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt64uMinValue_49() + CHIP_ERROR TestWriteAttributeBooleanTrue_7() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint64_t int64uArgument; - int64uArgument = 0ULL; + bool booleanArgument; + booleanArgument = 1; - ReturnErrorOnFailure(cluster.WriteAttribute( - int64uArgument, this, OnSuccessCallback_49, OnFailureCallback_49)); + ReturnErrorOnFailure(cluster.WriteAttribute( + booleanArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); return CHIP_NO_ERROR; } - void OnFailureResponse_49(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_49() { NextTest(); } + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64uMinValue_50() + CHIP_ERROR TestReadAttributeBooleanTrue_8() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_50, OnFailureCallback_50)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8)); return CHIP_NO_ERROR; } - void OnFailureResponse_50(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_50(uint64_t int64u) + void OnSuccessResponse_8(bool boolean) { - VerifyOrReturn(CheckValue("int64u", int64u, 0ULL)); + VerifyOrReturn(CheckValue("boolean", boolean, 1)); NextTest(); } - CHIP_ERROR TestReadAttributeInt8sDefaultValue_51() + CHIP_ERROR TestWriteAttributeBooleanFalse_9() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_51, OnFailureCallback_51)); + bool booleanArgument; + booleanArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + booleanArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); return CHIP_NO_ERROR; } - void OnFailureResponse_51(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_51(int8_t int8s) - { - VerifyOrReturn(CheckValue("int8s", int8s, 0)); + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - NextTest(); - } + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestWriteAttributeInt8sMaxValue_52() + CHIP_ERROR TestReadAttributeBooleanFalse_10() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - int8_t int8sArgument; - int8sArgument = 127; - - ReturnErrorOnFailure(cluster.WriteAttribute( - int8sArgument, this, OnSuccessCallback_52, OnFailureCallback_52)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10)); return CHIP_NO_ERROR; } - void OnFailureResponse_52(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_52() { NextTest(); } + void OnSuccessResponse_10(bool boolean) + { + VerifyOrReturn(CheckValue("boolean", boolean, 0)); - CHIP_ERROR TestReadAttributeInt8sMaxValue_53() + NextTest(); + } + + CHIP_ERROR TestReadAttributeBitmap8DefaultValue_11() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_53, OnFailureCallback_53)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11)); return CHIP_NO_ERROR; } - void OnFailureResponse_53(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_53(int8_t int8s) + void OnSuccessResponse_11(uint8_t bitmap8) { - VerifyOrReturn(CheckValue("int8s", int8s, 127)); + VerifyOrReturn(CheckValue("bitmap8", bitmap8, 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt8sMinValue_54() + CHIP_ERROR TestWriteAttributeBitmap8MaxValue_12() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - int8_t int8sArgument; - int8sArgument = -128; + uint8_t bitmap8Argument; + bitmap8Argument = 255; - ReturnErrorOnFailure(cluster.WriteAttribute( - int8sArgument, this, OnSuccessCallback_54, OnFailureCallback_54)); + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap8Argument, this, OnSuccessCallback_12, OnFailureCallback_12)); return CHIP_NO_ERROR; } - void OnFailureResponse_54(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_54() { NextTest(); } + void OnSuccessResponse_12() { NextTest(); } - CHIP_ERROR TestReadAttributeInt8sMinValue_55() + CHIP_ERROR TestReadAttributeBitmap8MaxValue_13() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_55, OnFailureCallback_55)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13)); return CHIP_NO_ERROR; } - void OnFailureResponse_55(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_55(int8_t int8s) + void OnSuccessResponse_13(uint8_t bitmap8) { - VerifyOrReturn(CheckValue("int8s", int8s, -128)); + VerifyOrReturn(CheckValue("bitmap8", bitmap8, 255)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt8sDefaultValue_56() + CHIP_ERROR TestWriteAttributeBitmap8MinValue_14() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - int8_t int8sArgument; - int8sArgument = 0; + uint8_t bitmap8Argument; + bitmap8Argument = 0; - ReturnErrorOnFailure(cluster.WriteAttribute( - int8sArgument, this, OnSuccessCallback_56, OnFailureCallback_56)); + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap8Argument, this, OnSuccessCallback_14, OnFailureCallback_14)); return CHIP_NO_ERROR; } - void OnFailureResponse_56(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_56() { NextTest(); } + void OnSuccessResponse_14() { NextTest(); } - CHIP_ERROR TestReadAttributeInt8sDefaultValue_57() + CHIP_ERROR TestReadAttributeBitmap8MinValue_15() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_57, OnFailureCallback_57)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_15, OnFailureCallback_15)); return CHIP_NO_ERROR; } - void OnFailureResponse_57(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_57(int8_t int8s) + void OnSuccessResponse_15(uint8_t bitmap8) { - VerifyOrReturn(CheckValue("int8s", int8s, 0)); + VerifyOrReturn(CheckValue("bitmap8", bitmap8, 0)); NextTest(); } - CHIP_ERROR TestReadAttributeInt16sDefaultValue_58() + CHIP_ERROR TestReadAttributeBitmap16DefaultValue_16() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_58, OnFailureCallback_58)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16)); return CHIP_NO_ERROR; } - void OnFailureResponse_58(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_58(int16_t int16s) + void OnSuccessResponse_16(uint16_t bitmap16) { - VerifyOrReturn(CheckValue("int16s", int16s, 0)); + VerifyOrReturn(CheckValue("bitmap16", bitmap16, 0U)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt16sMaxValue_59() + CHIP_ERROR TestWriteAttributeBitmap16MaxValue_17() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - int16_t int16sArgument; - int16sArgument = 32767; + uint16_t bitmap16Argument; + bitmap16Argument = 65535U; - ReturnErrorOnFailure(cluster.WriteAttribute( - int16sArgument, this, OnSuccessCallback_59, OnFailureCallback_59)); + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap16Argument, this, OnSuccessCallback_17, OnFailureCallback_17)); return CHIP_NO_ERROR; } - void OnFailureResponse_59(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_59() { NextTest(); } + void OnSuccessResponse_17() { NextTest(); } - CHIP_ERROR TestReadAttributeInt16sMaxValue_60() + CHIP_ERROR TestReadAttributeBitmap16MaxValue_18() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_60, OnFailureCallback_60)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18)); return CHIP_NO_ERROR; } - void OnFailureResponse_60(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_18(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_60(int16_t int16s) + void OnSuccessResponse_18(uint16_t bitmap16) { - VerifyOrReturn(CheckValue("int16s", int16s, 32767)); + VerifyOrReturn(CheckValue("bitmap16", bitmap16, 65535U)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt16sMinValue_61() + CHIP_ERROR TestWriteAttributeBitmap16MinValue_19() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - int16_t int16sArgument; - int16sArgument = -32768; + uint16_t bitmap16Argument; + bitmap16Argument = 0U; - ReturnErrorOnFailure(cluster.WriteAttribute( - int16sArgument, this, OnSuccessCallback_61, OnFailureCallback_61)); + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap16Argument, this, OnSuccessCallback_19, OnFailureCallback_19)); return CHIP_NO_ERROR; } - void OnFailureResponse_61(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_19(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_61() { NextTest(); } + void OnSuccessResponse_19() { NextTest(); } - CHIP_ERROR TestReadAttributeInt16sMinValue_62() + CHIP_ERROR TestReadAttributeBitmap16MinValue_20() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_62, OnFailureCallback_62)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20)); return CHIP_NO_ERROR; } - void OnFailureResponse_62(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_20(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_62(int16_t int16s) + void OnSuccessResponse_20(uint16_t bitmap16) { - VerifyOrReturn(CheckValue("int16s", int16s, -32768)); + VerifyOrReturn(CheckValue("bitmap16", bitmap16, 0U)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt16sDefaultValue_63() + CHIP_ERROR TestReadAttributeBitmap32DefaultValue_21() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - int16_t int16sArgument; - int16sArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute( - int16sArgument, this, OnSuccessCallback_63, OnFailureCallback_63)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_21, OnFailureCallback_21)); return CHIP_NO_ERROR; } - void OnFailureResponse_63(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_21(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_63() { NextTest(); } + void OnSuccessResponse_21(uint32_t bitmap32) + { + VerifyOrReturn(CheckValue("bitmap32", bitmap32, 0UL)); - CHIP_ERROR TestReadAttributeInt16sDefaultValue_64() + NextTest(); + } + + CHIP_ERROR TestWriteAttributeBitmap32MaxValue_22() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_64, OnFailureCallback_64)); + uint32_t bitmap32Argument; + bitmap32Argument = 4294967295UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap32Argument, this, OnSuccessCallback_22, OnFailureCallback_22)); return CHIP_NO_ERROR; } - void OnFailureResponse_64(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_64(int16_t int16s) - { - VerifyOrReturn(CheckValue("int16s", int16s, 0)); + void OnFailureResponse_22(EmberAfStatus status) { ThrowFailureResponse(); } - NextTest(); - } + void OnSuccessResponse_22() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32sDefaultValue_65() + CHIP_ERROR TestReadAttributeBitmap32MaxValue_23() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_65, OnFailureCallback_65)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_23, OnFailureCallback_23)); return CHIP_NO_ERROR; } - void OnFailureResponse_65(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_23(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_65(int32_t int32s) + void OnSuccessResponse_23(uint32_t bitmap32) { - VerifyOrReturn(CheckValue("int32s", int32s, 0L)); + VerifyOrReturn(CheckValue("bitmap32", bitmap32, 4294967295UL)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt32sMaxValue_66() + CHIP_ERROR TestWriteAttributeBitmap32MinValue_24() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - int32_t int32sArgument; - int32sArgument = 2147483647L; + uint32_t bitmap32Argument; + bitmap32Argument = 0UL; - ReturnErrorOnFailure(cluster.WriteAttribute( - int32sArgument, this, OnSuccessCallback_66, OnFailureCallback_66)); + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap32Argument, this, OnSuccessCallback_24, OnFailureCallback_24)); return CHIP_NO_ERROR; } - void OnFailureResponse_66(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_24(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_66() { NextTest(); } + void OnSuccessResponse_24() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32sMaxValue_67() + CHIP_ERROR TestReadAttributeBitmap32MinValue_25() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_67, OnFailureCallback_67)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_25, OnFailureCallback_25)); return CHIP_NO_ERROR; } - void OnFailureResponse_67(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_25(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_67(int32_t int32s) + void OnSuccessResponse_25(uint32_t bitmap32) { - VerifyOrReturn(CheckValue("int32s", int32s, 2147483647L)); + VerifyOrReturn(CheckValue("bitmap32", bitmap32, 0UL)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt32sMinValue_68() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int32_t int32sArgument; - int32sArgument = -2147483648L; - - ReturnErrorOnFailure(cluster.WriteAttribute( - int32sArgument, this, OnSuccessCallback_68, OnFailureCallback_68)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_68(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_68() { NextTest(); } - - CHIP_ERROR TestReadAttributeInt32sMinValue_69() + CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_69, OnFailureCallback_69)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_26, OnFailureCallback_26)); return CHIP_NO_ERROR; } - void OnFailureResponse_69(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_26(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_69(int32_t int32s) + void OnSuccessResponse_26(uint64_t bitmap64) { - VerifyOrReturn(CheckValue("int32s", int32s, -2147483648L)); + VerifyOrReturn(CheckValue("bitmap64", bitmap64, 0ULL)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt32sDefaultValue_70() + CHIP_ERROR TestWriteAttributeBitmap64MaxValue_27() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - int32_t int32sArgument; - int32sArgument = 0L; + uint64_t bitmap64Argument; + bitmap64Argument = 18446744073709551615ULL; - ReturnErrorOnFailure(cluster.WriteAttribute( - int32sArgument, this, OnSuccessCallback_70, OnFailureCallback_70)); + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap64Argument, this, OnSuccessCallback_27, OnFailureCallback_27)); return CHIP_NO_ERROR; } - void OnFailureResponse_70(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_27(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_70() { NextTest(); } + void OnSuccessResponse_27() { NextTest(); } - CHIP_ERROR TestReadAttributeInt32sDefaultValue_71() + CHIP_ERROR TestReadAttributeBitmap64MaxValue_28() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_71, OnFailureCallback_71)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_28, OnFailureCallback_28)); return CHIP_NO_ERROR; } - void OnFailureResponse_71(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_28(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_71(int32_t int32s) + void OnSuccessResponse_28(uint64_t bitmap64) { - VerifyOrReturn(CheckValue("int32s", int32s, 0L)); + VerifyOrReturn(CheckValue("bitmap64", bitmap64, 18446744073709551615ULL)); NextTest(); } - CHIP_ERROR TestReadAttributeInt64sDefaultValue_72() + CHIP_ERROR TestWriteAttributeBitmap64MinValue_29() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_72, OnFailureCallback_72)); + uint64_t bitmap64Argument; + bitmap64Argument = 0ULL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + bitmap64Argument, this, OnSuccessCallback_29, OnFailureCallback_29)); return CHIP_NO_ERROR; } - void OnFailureResponse_72(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_72(int64_t int64s) - { - VerifyOrReturn(CheckValue("int64s", int64s, 0LL)); + void OnFailureResponse_29(EmberAfStatus status) { ThrowFailureResponse(); } - NextTest(); - } + void OnSuccessResponse_29() { NextTest(); } - CHIP_ERROR TestWriteAttributeInt64sMaxValue_73() + CHIP_ERROR TestReadAttributeBitmap64MinValue_30() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - int64_t int64sArgument; - int64sArgument = 9223372036854775807LL; - - ReturnErrorOnFailure(cluster.WriteAttribute( - int64sArgument, this, OnSuccessCallback_73, OnFailureCallback_73)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_30, OnFailureCallback_30)); return CHIP_NO_ERROR; } - void OnFailureResponse_73(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_30(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_73() { NextTest(); } + void OnSuccessResponse_30(uint64_t bitmap64) + { + VerifyOrReturn(CheckValue("bitmap64", bitmap64, 0ULL)); - CHIP_ERROR TestReadAttributeInt64sMaxValue_74() + NextTest(); + } + + CHIP_ERROR TestReadAttributeInt8uDefaultValue_31() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_74, OnFailureCallback_74)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_31, OnFailureCallback_31)); return CHIP_NO_ERROR; } - void OnFailureResponse_74(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_31(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_74(int64_t int64s) + void OnSuccessResponse_31(uint8_t int8u) { - VerifyOrReturn(CheckValue("int64s", int64s, 9223372036854775807LL)); + VerifyOrReturn(CheckValue("int8u", int8u, 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt64sMinValue_75() + CHIP_ERROR TestWriteAttributeInt8uMaxValue_32() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - int64_t int64sArgument; - int64sArgument = -9223372036854775807LL; + uint8_t int8uArgument; + int8uArgument = 255; - ReturnErrorOnFailure(cluster.WriteAttribute( - int64sArgument, this, OnSuccessCallback_75, OnFailureCallback_75)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int8uArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); return CHIP_NO_ERROR; } - void OnFailureResponse_75(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_32(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_75() { NextTest(); } + void OnSuccessResponse_32() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64sMinValue_76() + CHIP_ERROR TestReadAttributeInt8uMaxValue_33() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_76, OnFailureCallback_76)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_33, OnFailureCallback_33)); return CHIP_NO_ERROR; } - void OnFailureResponse_76(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_33(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_76(int64_t int64s) + void OnSuccessResponse_33(uint8_t int8u) { - VerifyOrReturn(CheckValue("int64s", int64s, -9223372036854775807LL)); + VerifyOrReturn(CheckValue("int8u", int8u, 255)); NextTest(); } - CHIP_ERROR TestWriteAttributeInt64sDefaultValue_77() + CHIP_ERROR TestWriteAttributeInt8uMinValue_34() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - int64_t int64sArgument; - int64sArgument = 0LL; + uint8_t int8uArgument; + int8uArgument = 0; - ReturnErrorOnFailure(cluster.WriteAttribute( - int64sArgument, this, OnSuccessCallback_77, OnFailureCallback_77)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int8uArgument, this, OnSuccessCallback_34, OnFailureCallback_34)); return CHIP_NO_ERROR; } - void OnFailureResponse_77(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_34(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_77() { NextTest(); } + void OnSuccessResponse_34() { NextTest(); } - CHIP_ERROR TestReadAttributeInt64sDefaultValue_78() + CHIP_ERROR TestReadAttributeInt8uMinValue_35() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_78, OnFailureCallback_78)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_35, OnFailureCallback_35)); return CHIP_NO_ERROR; } - void OnFailureResponse_78(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_35(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_78(int64_t int64s) + void OnSuccessResponse_35(uint8_t int8u) { - VerifyOrReturn(CheckValue("int64s", int64s, 0LL)); + VerifyOrReturn(CheckValue("int8u", int8u, 0)); NextTest(); } - CHIP_ERROR TestReadAttributeSingleDefaultValue_79() + CHIP_ERROR TestReadAttributeInt16uDefaultValue_36() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_79, OnFailureCallback_79)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_36, OnFailureCallback_36)); return CHIP_NO_ERROR; } - void OnFailureResponse_79(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_36(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_79(float floatSingle) + void OnSuccessResponse_36(uint16_t int16u) { - VerifyOrReturn(CheckValue("floatSingle", floatSingle, 0.0f)); + VerifyOrReturn(CheckValue("int16u", int16u, 0U)); NextTest(); } - CHIP_ERROR TestWriteAttributeSingleMediumValue_80() + CHIP_ERROR TestWriteAttributeInt16uMaxValue_37() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - float floatSingleArgument; - floatSingleArgument = 0.1f; + uint16_t int16uArgument; + int16uArgument = 65535U; - ReturnErrorOnFailure(cluster.WriteAttribute( - floatSingleArgument, this, OnSuccessCallback_80, OnFailureCallback_80)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int16uArgument, this, OnSuccessCallback_37, OnFailureCallback_37)); return CHIP_NO_ERROR; } - void OnFailureResponse_80(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_37(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_80() { NextTest(); } + void OnSuccessResponse_37() { NextTest(); } - CHIP_ERROR TestReadAttributeSingleMediumValue_81() + CHIP_ERROR TestReadAttributeInt16uMaxValue_38() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_81, OnFailureCallback_81)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_38, OnFailureCallback_38)); return CHIP_NO_ERROR; } - void OnFailureResponse_81(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_38(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_81(float floatSingle) + void OnSuccessResponse_38(uint16_t int16u) { - VerifyOrReturn(CheckValue("floatSingle", floatSingle, 0.1f)); + VerifyOrReturn(CheckValue("int16u", int16u, 65535U)); NextTest(); } - CHIP_ERROR TestWriteAttributeSingleLargeValue_82() + CHIP_ERROR TestWriteAttributeInt16uMinValue_39() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - float floatSingleArgument; - floatSingleArgument = 17000000000.0f; + uint16_t int16uArgument; + int16uArgument = 0U; - ReturnErrorOnFailure(cluster.WriteAttribute( - floatSingleArgument, this, OnSuccessCallback_82, OnFailureCallback_82)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int16uArgument, this, OnSuccessCallback_39, OnFailureCallback_39)); return CHIP_NO_ERROR; } - void OnFailureResponse_82(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_39(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_82() { NextTest(); } + void OnSuccessResponse_39() { NextTest(); } - CHIP_ERROR TestReadAttributeSingleLargeValue_83() + CHIP_ERROR TestReadAttributeInt16uMinValue_40() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_83, OnFailureCallback_83)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_40, OnFailureCallback_40)); return CHIP_NO_ERROR; } - void OnFailureResponse_83(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_40(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_83(float floatSingle) + void OnSuccessResponse_40(uint16_t int16u) { - VerifyOrReturn(CheckValue("floatSingle", floatSingle, 17000000000.0f)); + VerifyOrReturn(CheckValue("int16u", int16u, 0U)); NextTest(); } - CHIP_ERROR TestWriteAttributeSingleSmallValue_84() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - float floatSingleArgument; - floatSingleArgument = 1.7e-10f; - - ReturnErrorOnFailure(cluster.WriteAttribute( - floatSingleArgument, this, OnSuccessCallback_84, OnFailureCallback_84)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_84(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_84() { NextTest(); } - - CHIP_ERROR TestReadAttributeSingleSmallValue_85() + CHIP_ERROR TestReadAttributeInt32uDefaultValue_41() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_85, OnFailureCallback_85)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_41, OnFailureCallback_41)); return CHIP_NO_ERROR; } - void OnFailureResponse_85(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_41(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_85(float floatSingle) + void OnSuccessResponse_41(uint32_t int32u) { - VerifyOrReturn(CheckValue("floatSingle", floatSingle, 1.7e-10f)); + VerifyOrReturn(CheckValue("int32u", int32u, 0UL)); NextTest(); } - CHIP_ERROR TestWriteAttributeSingleDefaultValue_86() + CHIP_ERROR TestWriteAttributeInt32uMaxValue_42() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - float floatSingleArgument; - floatSingleArgument = 0.0f; + uint32_t int32uArgument; + int32uArgument = 4294967295UL; - ReturnErrorOnFailure(cluster.WriteAttribute( - floatSingleArgument, this, OnSuccessCallback_86, OnFailureCallback_86)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int32uArgument, this, OnSuccessCallback_42, OnFailureCallback_42)); return CHIP_NO_ERROR; } - void OnFailureResponse_86(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_42(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_86() { NextTest(); } + void OnSuccessResponse_42() { NextTest(); } - CHIP_ERROR TestReadAttributeSingleDefaultValue_87() + CHIP_ERROR TestReadAttributeInt32uMaxValue_43() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_87, OnFailureCallback_87)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_43, OnFailureCallback_43)); return CHIP_NO_ERROR; } - void OnFailureResponse_87(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_43(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_87(float floatSingle) + void OnSuccessResponse_43(uint32_t int32u) { - VerifyOrReturn(CheckValue("floatSingle", floatSingle, 0.0f)); + VerifyOrReturn(CheckValue("int32u", int32u, 4294967295UL)); NextTest(); } - CHIP_ERROR TestReadAttributeDoubleDefaultValue_88() + CHIP_ERROR TestWriteAttributeInt32uMinValue_44() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_88, OnFailureCallback_88)); + uint32_t int32uArgument; + int32uArgument = 0UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + int32uArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); return CHIP_NO_ERROR; } - void OnFailureResponse_88(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_88(double floatDouble) - { - VerifyOrReturn(CheckValue("floatDouble", floatDouble, 0)); + void OnFailureResponse_44(EmberAfStatus status) { ThrowFailureResponse(); } - NextTest(); - } + void OnSuccessResponse_44() { NextTest(); } - CHIP_ERROR TestWriteAttributeDoubleMediumValue_89() + CHIP_ERROR TestReadAttributeInt32uMinValue_45() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - double floatDoubleArgument; - floatDoubleArgument = 0.1234567890123; - - ReturnErrorOnFailure(cluster.WriteAttribute( - floatDoubleArgument, this, OnSuccessCallback_89, OnFailureCallback_89)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_45, OnFailureCallback_45)); return CHIP_NO_ERROR; } - void OnFailureResponse_89(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_45(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_89() { NextTest(); } + void OnSuccessResponse_45(uint32_t int32u) + { + VerifyOrReturn(CheckValue("int32u", int32u, 0UL)); - CHIP_ERROR TestReadAttributeDoubleMediumValue_90() + NextTest(); + } + + CHIP_ERROR TestReadAttributeInt64uDefaultValue_46() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_90, OnFailureCallback_90)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_46, OnFailureCallback_46)); return CHIP_NO_ERROR; } - void OnFailureResponse_90(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_46(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_90(double floatDouble) + void OnSuccessResponse_46(uint64_t int64u) { - VerifyOrReturn(CheckValue("floatDouble", floatDouble, 0.1234567890123)); + VerifyOrReturn(CheckValue("int64u", int64u, 0ULL)); NextTest(); } - CHIP_ERROR TestWriteAttributeDoubleLargeValue_91() + CHIP_ERROR TestWriteAttributeInt64uMaxValue_47() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - double floatDoubleArgument; - floatDoubleArgument = 1.7e+200; + uint64_t int64uArgument; + int64uArgument = 18446744073709551615ULL; - ReturnErrorOnFailure(cluster.WriteAttribute( - floatDoubleArgument, this, OnSuccessCallback_91, OnFailureCallback_91)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int64uArgument, this, OnSuccessCallback_47, OnFailureCallback_47)); return CHIP_NO_ERROR; } - void OnFailureResponse_91(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_47(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_91() { NextTest(); } + void OnSuccessResponse_47() { NextTest(); } - CHIP_ERROR TestReadAttributeDoubleLargeValue_92() + CHIP_ERROR TestReadAttributeInt64uMaxValue_48() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_92, OnFailureCallback_92)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_48, OnFailureCallback_48)); return CHIP_NO_ERROR; } - void OnFailureResponse_92(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_48(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_92(double floatDouble) + void OnSuccessResponse_48(uint64_t int64u) { - VerifyOrReturn(CheckValue("floatDouble", floatDouble, 1.7e+200)); + VerifyOrReturn(CheckValue("int64u", int64u, 18446744073709551615ULL)); NextTest(); } - CHIP_ERROR TestWriteAttributeDoubleSmallValue_93() + CHIP_ERROR TestWriteAttributeInt64uMinValue_49() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - double floatDoubleArgument; - floatDoubleArgument = 1.7e-200; + uint64_t int64uArgument; + int64uArgument = 0ULL; - ReturnErrorOnFailure(cluster.WriteAttribute( - floatDoubleArgument, this, OnSuccessCallback_93, OnFailureCallback_93)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int64uArgument, this, OnSuccessCallback_49, OnFailureCallback_49)); return CHIP_NO_ERROR; } - void OnFailureResponse_93(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_49(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_93() { NextTest(); } + void OnSuccessResponse_49() { NextTest(); } - CHIP_ERROR TestReadAttributeDoubleSmallValue_94() + CHIP_ERROR TestReadAttributeInt64uMinValue_50() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_94, OnFailureCallback_94)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_50, OnFailureCallback_50)); return CHIP_NO_ERROR; } - void OnFailureResponse_94(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_50(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_94(double floatDouble) + void OnSuccessResponse_50(uint64_t int64u) { - VerifyOrReturn(CheckValue("floatDouble", floatDouble, 1.7e-200)); + VerifyOrReturn(CheckValue("int64u", int64u, 0ULL)); NextTest(); } - CHIP_ERROR TestWriteAttributeDoubleDefaultValue_95() + CHIP_ERROR TestReadAttributeInt8sDefaultValue_51() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - double floatDoubleArgument; - floatDoubleArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute( - floatDoubleArgument, this, OnSuccessCallback_95, OnFailureCallback_95)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_51, OnFailureCallback_51)); return CHIP_NO_ERROR; } - void OnFailureResponse_95(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_51(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_95() { NextTest(); } + void OnSuccessResponse_51(int8_t int8s) + { + VerifyOrReturn(CheckValue("int8s", int8s, 0)); - CHIP_ERROR TestReadAttributeDoubleDefaultValue_96() + NextTest(); + } + + CHIP_ERROR TestWriteAttributeInt8sMaxValue_52() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_96, OnFailureCallback_96)); + int8_t int8sArgument; + int8sArgument = 127; + + ReturnErrorOnFailure(cluster.WriteAttribute( + int8sArgument, this, OnSuccessCallback_52, OnFailureCallback_52)); return CHIP_NO_ERROR; } - void OnFailureResponse_96(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_96(double floatDouble) - { - VerifyOrReturn(CheckValue("floatDouble", floatDouble, 0)); + void OnFailureResponse_52(EmberAfStatus status) { ThrowFailureResponse(); } - NextTest(); - } + void OnSuccessResponse_52() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum8DefaultValue_97() + CHIP_ERROR TestReadAttributeInt8sMaxValue_53() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_97, OnFailureCallback_97)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_53, OnFailureCallback_53)); return CHIP_NO_ERROR; } - void OnFailureResponse_97(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_53(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_97(uint8_t enum8) + void OnSuccessResponse_53(int8_t int8s) { - VerifyOrReturn(CheckValue("enum8", enum8, 0)); + VerifyOrReturn(CheckValue("int8s", int8s, 127)); NextTest(); } - CHIP_ERROR TestWriteAttributeEnum8MaxValue_98() + CHIP_ERROR TestWriteAttributeInt8sMinValue_54() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t enum8Argument; - enum8Argument = 255; + int8_t int8sArgument; + int8sArgument = -128; - ReturnErrorOnFailure(cluster.WriteAttribute( - enum8Argument, this, OnSuccessCallback_98, OnFailureCallback_98)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int8sArgument, this, OnSuccessCallback_54, OnFailureCallback_54)); return CHIP_NO_ERROR; } - void OnFailureResponse_98(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_54(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_98() { NextTest(); } + void OnSuccessResponse_54() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum8MaxValue_99() + CHIP_ERROR TestReadAttributeInt8sMinValue_55() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_99, OnFailureCallback_99)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_55, OnFailureCallback_55)); return CHIP_NO_ERROR; } - void OnFailureResponse_99(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_55(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_99(uint8_t enum8) + void OnSuccessResponse_55(int8_t int8s) { - VerifyOrReturn(CheckValue("enum8", enum8, 255)); + VerifyOrReturn(CheckValue("int8s", int8s, -128)); NextTest(); } - CHIP_ERROR TestWriteAttributeEnum8MinValue_100() + CHIP_ERROR TestWriteAttributeInt8sDefaultValue_56() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t enum8Argument; - enum8Argument = 0; + int8_t int8sArgument; + int8sArgument = 0; - ReturnErrorOnFailure(cluster.WriteAttribute( - enum8Argument, this, OnSuccessCallback_100, OnFailureCallback_100)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int8sArgument, this, OnSuccessCallback_56, OnFailureCallback_56)); return CHIP_NO_ERROR; } - void OnFailureResponse_100(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_56(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_100() { NextTest(); } + void OnSuccessResponse_56() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum8MinValue_101() + CHIP_ERROR TestReadAttributeInt8sDefaultValue_57() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_101, OnFailureCallback_101)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_57, OnFailureCallback_57)); return CHIP_NO_ERROR; } - void OnFailureResponse_101(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_57(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_101(uint8_t enum8) + void OnSuccessResponse_57(int8_t int8s) { - VerifyOrReturn(CheckValue("enum8", enum8, 0)); + VerifyOrReturn(CheckValue("int8s", int8s, 0)); NextTest(); } - CHIP_ERROR TestReadAttributeEnum16DefaultValue_102() + CHIP_ERROR TestReadAttributeInt16sDefaultValue_58() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_102, OnFailureCallback_102)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_58, OnFailureCallback_58)); return CHIP_NO_ERROR; } - void OnFailureResponse_102(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_58(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_102(uint16_t enum16) + void OnSuccessResponse_58(int16_t int16s) { - VerifyOrReturn(CheckValue("enum16", enum16, 0U)); + VerifyOrReturn(CheckValue("int16s", int16s, 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeEnum16MaxValue_103() + CHIP_ERROR TestWriteAttributeInt16sMaxValue_59() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t enum16Argument; - enum16Argument = 65535U; + int16_t int16sArgument; + int16sArgument = 32767; - ReturnErrorOnFailure(cluster.WriteAttribute( - enum16Argument, this, OnSuccessCallback_103, OnFailureCallback_103)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int16sArgument, this, OnSuccessCallback_59, OnFailureCallback_59)); return CHIP_NO_ERROR; } - void OnFailureResponse_103(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_59(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_103() { NextTest(); } + void OnSuccessResponse_59() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum16MaxValue_104() + CHIP_ERROR TestReadAttributeInt16sMaxValue_60() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_104, OnFailureCallback_104)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_60, OnFailureCallback_60)); return CHIP_NO_ERROR; } - void OnFailureResponse_104(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_60(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_104(uint16_t enum16) + void OnSuccessResponse_60(int16_t int16s) { - VerifyOrReturn(CheckValue("enum16", enum16, 65535U)); + VerifyOrReturn(CheckValue("int16s", int16s, 32767)); NextTest(); } - CHIP_ERROR TestWriteAttributeEnum16MinValue_105() + CHIP_ERROR TestWriteAttributeInt16sMinValue_61() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t enum16Argument; - enum16Argument = 0U; + int16_t int16sArgument; + int16sArgument = -32768; - ReturnErrorOnFailure(cluster.WriteAttribute( - enum16Argument, this, OnSuccessCallback_105, OnFailureCallback_105)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int16sArgument, this, OnSuccessCallback_61, OnFailureCallback_61)); return CHIP_NO_ERROR; } - void OnFailureResponse_105(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_61(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_105() { NextTest(); } + void OnSuccessResponse_61() { NextTest(); } - CHIP_ERROR TestReadAttributeEnum16MinValue_106() + CHIP_ERROR TestReadAttributeInt16sMinValue_62() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_106, OnFailureCallback_106)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_62, OnFailureCallback_62)); return CHIP_NO_ERROR; } - void OnFailureResponse_106(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_62(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_106(uint16_t enum16) + void OnSuccessResponse_62(int16_t int16s) { - VerifyOrReturn(CheckValue("enum16", enum16, 0U)); + VerifyOrReturn(CheckValue("int16s", int16s, -32768)); NextTest(); } - CHIP_ERROR TestReadAttributeOctetStringDefaultValue_107() + CHIP_ERROR TestWriteAttributeInt16sDefaultValue_63() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_107, OnFailureCallback_107)); + int16_t int16sArgument; + int16sArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + int16sArgument, this, OnSuccessCallback_63, OnFailureCallback_63)); return CHIP_NO_ERROR; } - void OnFailureResponse_107(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_107(chip::ByteSpan octetString) - { - VerifyOrReturn(CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); + void OnFailureResponse_63(EmberAfStatus status) { ThrowFailureResponse(); } - NextTest(); - } + void OnSuccessResponse_63() { NextTest(); } - CHIP_ERROR TestWriteAttributeOctetStringWithEmbeddedNull_108() + CHIP_ERROR TestReadAttributeInt16sDefaultValue_64() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::ByteSpan octetStringArgument; - octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("Tes\x00ti\x00nggarbage: not in length on purpose"), 9); - - ReturnErrorOnFailure(cluster.WriteAttribute( - octetStringArgument, this, OnSuccessCallback_108, OnFailureCallback_108)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_64, OnFailureCallback_64)); return CHIP_NO_ERROR; } - void OnFailureResponse_108(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_64(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_108() { NextTest(); } + void OnSuccessResponse_64(int16_t int16s) + { + VerifyOrReturn(CheckValue("int16s", int16s, 0)); - CHIP_ERROR TestReadAttributeOctetStringWithEmbeddedNull_109() + NextTest(); + } + + CHIP_ERROR TestReadAttributeInt32sDefaultValue_65() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_109, OnFailureCallback_109)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_65, OnFailureCallback_65)); return CHIP_NO_ERROR; } - void OnFailureResponse_109(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_65(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_109(chip::ByteSpan octetString) + void OnSuccessResponse_65(int32_t int32s) { - VerifyOrReturn( - CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("Tes\x00ti\x00ng"), 9))); + VerifyOrReturn(CheckValue("int32s", int32s, 0L)); NextTest(); } - CHIP_ERROR TestWriteAttributeOctetString_110() + CHIP_ERROR TestWriteAttributeInt32sMaxValue_66() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::ByteSpan octetStringArgument; - octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); + int32_t int32sArgument; + int32sArgument = 2147483647L; - ReturnErrorOnFailure(cluster.WriteAttribute( - octetStringArgument, this, OnSuccessCallback_110, OnFailureCallback_110)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int32sArgument, this, OnSuccessCallback_66, OnFailureCallback_66)); return CHIP_NO_ERROR; } - void OnFailureResponse_110(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_66(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_110() { NextTest(); } + void OnSuccessResponse_66() { NextTest(); } - CHIP_ERROR TestReadAttributeOctetString_111() + CHIP_ERROR TestReadAttributeInt32sMaxValue_67() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_111, OnFailureCallback_111)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_67, OnFailureCallback_67)); return CHIP_NO_ERROR; } - void OnFailureResponse_111(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_67(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_111(chip::ByteSpan octetString) + void OnSuccessResponse_67(int32_t int32s) { - VerifyOrReturn( - CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); + VerifyOrReturn(CheckValue("int32s", int32s, 2147483647L)); NextTest(); } - CHIP_ERROR TestWriteAttributeOctetString_112() + CHIP_ERROR TestWriteAttributeInt32sMinValue_68() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::ByteSpan octetStringArgument; - octetStringArgument = - chip::ByteSpan(chip::Uint8::from_const_char("TestValueLongerThan10garbage: not in length on purpose"), 21); + int32_t int32sArgument; + int32sArgument = -2147483648L; - ReturnErrorOnFailure(cluster.WriteAttribute( - octetStringArgument, this, OnSuccessCallback_112, OnFailureCallback_112)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int32sArgument, this, OnSuccessCallback_68, OnFailureCallback_68)); return CHIP_NO_ERROR; } - void OnFailureResponse_112(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } + void OnFailureResponse_68(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_112() { ThrowSuccessResponse(); } + void OnSuccessResponse_68() { NextTest(); } - CHIP_ERROR TestReadAttributeOctetString_113() + CHIP_ERROR TestReadAttributeInt32sMinValue_69() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_113, OnFailureCallback_113)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_69, OnFailureCallback_69)); return CHIP_NO_ERROR; } - void OnFailureResponse_113(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_69(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_113(chip::ByteSpan octetString) + void OnSuccessResponse_69(int32_t int32s) { - VerifyOrReturn( - CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); + VerifyOrReturn(CheckValue("int32s", int32s, -2147483648L)); NextTest(); } - CHIP_ERROR TestWriteAttributeOctetString_114() + CHIP_ERROR TestWriteAttributeInt32sDefaultValue_70() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::ByteSpan octetStringArgument; - octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + int32_t int32sArgument; + int32sArgument = 0L; - ReturnErrorOnFailure(cluster.WriteAttribute( - octetStringArgument, this, OnSuccessCallback_114, OnFailureCallback_114)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int32sArgument, this, OnSuccessCallback_70, OnFailureCallback_70)); return CHIP_NO_ERROR; } - void OnFailureResponse_114(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_70(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_114() { NextTest(); } + void OnSuccessResponse_70() { NextTest(); } - CHIP_ERROR TestReadAttributeLongOctetStringDefaultValue_115() + CHIP_ERROR TestReadAttributeInt32sDefaultValue_71() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_115, OnFailureCallback_115)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_71, OnFailureCallback_71)); return CHIP_NO_ERROR; } - void OnFailureResponse_115(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_71(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_115(chip::ByteSpan longOctetString) + void OnSuccessResponse_71(int32_t int32s) { - VerifyOrReturn(CheckValueAsString("longOctetString", longOctetString, chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); + VerifyOrReturn(CheckValue("int32s", int32s, 0L)); NextTest(); } - CHIP_ERROR TestWriteAttributeLongOctetString_116() + CHIP_ERROR TestReadAttributeInt64sDefaultValue_72() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::ByteSpan longOctetStringArgument; - longOctetStringArgument = chip::ByteSpan( - chip::Uint8::from_const_char( - "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - "111111111111111111111111111111111111111111111111111111111111111111111111garbage: not in length on purpose"), - 300); - - ReturnErrorOnFailure(cluster.WriteAttribute( - longOctetStringArgument, this, OnSuccessCallback_116, OnFailureCallback_116)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_72, OnFailureCallback_72)); return CHIP_NO_ERROR; } - void OnFailureResponse_116(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_72(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_116() { NextTest(); } + void OnSuccessResponse_72(int64_t int64s) + { + VerifyOrReturn(CheckValue("int64s", int64s, 0LL)); - CHIP_ERROR TestReadAttributeLongOctetString_117() + NextTest(); + } + + CHIP_ERROR TestWriteAttributeInt64sMaxValue_73() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_117, OnFailureCallback_117)); + int64_t int64sArgument; + int64sArgument = 9223372036854775807LL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + int64sArgument, this, OnSuccessCallback_73, OnFailureCallback_73)); return CHIP_NO_ERROR; } - void OnFailureResponse_117(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_73(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_117(chip::ByteSpan longOctetString) + void OnSuccessResponse_73() { NextTest(); } + + CHIP_ERROR TestReadAttributeInt64sMaxValue_74() { - VerifyOrReturn(CheckValueAsString( - "longOctetString", longOctetString, - chip::ByteSpan( - chip::Uint8::from_const_char( - "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - "11111111111111111111111111111111111111111111111111111111111111111111111111111111"), - 300))); + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_74, OnFailureCallback_74)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_74(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_74(int64_t int64s) + { + VerifyOrReturn(CheckValue("int64s", int64s, 9223372036854775807LL)); NextTest(); } - CHIP_ERROR TestWriteAttributeLongOctetString_118() + CHIP_ERROR TestWriteAttributeInt64sMinValue_75() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::ByteSpan longOctetStringArgument; - longOctetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + int64_t int64sArgument; + int64sArgument = -9223372036854775807LL; - ReturnErrorOnFailure(cluster.WriteAttribute( - longOctetStringArgument, this, OnSuccessCallback_118, OnFailureCallback_118)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int64sArgument, this, OnSuccessCallback_75, OnFailureCallback_75)); return CHIP_NO_ERROR; } - void OnFailureResponse_118(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_75(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_118() { NextTest(); } + void OnSuccessResponse_75() { NextTest(); } - CHIP_ERROR TestReadAttributeCharStringDefaultValue_119() + CHIP_ERROR TestReadAttributeInt64sMinValue_76() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_119, OnFailureCallback_119)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_76, OnFailureCallback_76)); return CHIP_NO_ERROR; } - void OnFailureResponse_119(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_76(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_119(chip::CharSpan charString) + void OnSuccessResponse_76(int64_t int64s) { - VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("int64s", int64s, -9223372036854775807LL)); NextTest(); } - CHIP_ERROR TestWriteAttributeCharString_120() + CHIP_ERROR TestWriteAttributeInt64sDefaultValue_77() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::CharSpan charStringArgument; - charStringArgument = chip::Span("☉T☉garbage: not in length on purpose", 7); + int64_t int64sArgument; + int64sArgument = 0LL; - ReturnErrorOnFailure(cluster.WriteAttribute( - charStringArgument, this, OnSuccessCallback_120, OnFailureCallback_120)); + ReturnErrorOnFailure(cluster.WriteAttribute( + int64sArgument, this, OnSuccessCallback_77, OnFailureCallback_77)); return CHIP_NO_ERROR; } - void OnFailureResponse_120(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_77(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_120() { NextTest(); } + void OnSuccessResponse_77() { NextTest(); } - CHIP_ERROR TestReadAttributeCharString_121() + CHIP_ERROR TestReadAttributeInt64sDefaultValue_78() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_121, OnFailureCallback_121)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_78, OnFailureCallback_78)); return CHIP_NO_ERROR; } - void OnFailureResponse_121(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_78(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_121(chip::CharSpan charString) + void OnSuccessResponse_78(int64_t int64s) { - VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("☉T☉", 7))); + VerifyOrReturn(CheckValue("int64s", int64s, 0LL)); NextTest(); } - CHIP_ERROR TestWriteAttributeCharStringValueTooLong_122() + CHIP_ERROR TestReadAttributeSingleDefaultValue_79() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::CharSpan charStringArgument; - charStringArgument = chip::Span("☉TestValueLongerThan10☉garbage: not in length on purpose", 27); - - ReturnErrorOnFailure(cluster.WriteAttribute( - charStringArgument, this, OnSuccessCallback_122, OnFailureCallback_122)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_79, OnFailureCallback_79)); return CHIP_NO_ERROR; } - void OnFailureResponse_122(EmberAfStatus status) + void OnFailureResponse_79(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_79(float floatSingle) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("floatSingle", floatSingle, 0.0f)); + NextTest(); } - void OnSuccessResponse_122() { ThrowSuccessResponse(); } + CHIP_ERROR TestWriteAttributeSingleMediumValue_80() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - CHIP_ERROR TestReadAttributeCharString_123() + float floatSingleArgument; + floatSingleArgument = 0.1f; + + ReturnErrorOnFailure(cluster.WriteAttribute( + floatSingleArgument, this, OnSuccessCallback_80, OnFailureCallback_80)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_80(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_80() { NextTest(); } + + CHIP_ERROR TestReadAttributeSingleMediumValue_81() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_123, OnFailureCallback_123)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_81, OnFailureCallback_81)); return CHIP_NO_ERROR; } - void OnFailureResponse_123(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_81(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_123(chip::CharSpan charString) + void OnSuccessResponse_81(float floatSingle) { - VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("☉T☉", 7))); + VerifyOrReturn(CheckValue("floatSingle", floatSingle, 0.1f)); NextTest(); } - CHIP_ERROR TestWriteAttributeCharStringEmpty_124() + CHIP_ERROR TestWriteAttributeSingleLargeValue_82() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::CharSpan charStringArgument; - charStringArgument = chip::Span("garbage: not in length on purpose", 0); + float floatSingleArgument; + floatSingleArgument = 17000000000.0f; - ReturnErrorOnFailure(cluster.WriteAttribute( - charStringArgument, this, OnSuccessCallback_124, OnFailureCallback_124)); + ReturnErrorOnFailure(cluster.WriteAttribute( + floatSingleArgument, this, OnSuccessCallback_82, OnFailureCallback_82)); return CHIP_NO_ERROR; } - void OnFailureResponse_124(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_82(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_124() { NextTest(); } + void OnSuccessResponse_82() { NextTest(); } - CHIP_ERROR TestReadAttributeLongCharStringDefaultValue_125() + CHIP_ERROR TestReadAttributeSingleLargeValue_83() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_125, OnFailureCallback_125)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_83, OnFailureCallback_83)); return CHIP_NO_ERROR; } - void OnFailureResponse_125(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_83(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_125(chip::CharSpan longCharString) + void OnSuccessResponse_83(float floatSingle) { - VerifyOrReturn(CheckValueAsString("longCharString", longCharString, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("floatSingle", floatSingle, 17000000000.0f)); NextTest(); } - CHIP_ERROR TestWriteAttributeLongCharString_126() + CHIP_ERROR TestWriteAttributeSingleSmallValue_84() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::CharSpan longCharStringArgument; - longCharStringArgument = chip::Span( - "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" - "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" - "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉garbage: not in length on purpose", - 900); + float floatSingleArgument; + floatSingleArgument = 1.7e-10f; - ReturnErrorOnFailure(cluster.WriteAttribute( - longCharStringArgument, this, OnSuccessCallback_126, OnFailureCallback_126)); + ReturnErrorOnFailure(cluster.WriteAttribute( + floatSingleArgument, this, OnSuccessCallback_84, OnFailureCallback_84)); return CHIP_NO_ERROR; } - void OnFailureResponse_126(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_84(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_126() { NextTest(); } + void OnSuccessResponse_84() { NextTest(); } - CHIP_ERROR TestReadAttributeLongCharString_127() + CHIP_ERROR TestReadAttributeSingleSmallValue_85() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_127, OnFailureCallback_127)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_85, OnFailureCallback_85)); return CHIP_NO_ERROR; } - void OnFailureResponse_127(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_85(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_127(chip::CharSpan longCharString) + void OnSuccessResponse_85(float floatSingle) { - VerifyOrReturn(CheckValueAsString( - "longCharString", longCharString, - chip::CharSpan("☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" - "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" - "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉", - 900))); + VerifyOrReturn(CheckValue("floatSingle", floatSingle, 1.7e-10f)); NextTest(); } - CHIP_ERROR TestWriteAttributeLongCharString_128() + CHIP_ERROR TestWriteAttributeSingleDefaultValue_86() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::CharSpan longCharStringArgument; - longCharStringArgument = chip::Span("garbage: not in length on purpose", 0); + float floatSingleArgument; + floatSingleArgument = 0.0f; - ReturnErrorOnFailure(cluster.WriteAttribute( - longCharStringArgument, this, OnSuccessCallback_128, OnFailureCallback_128)); + ReturnErrorOnFailure(cluster.WriteAttribute( + floatSingleArgument, this, OnSuccessCallback_86, OnFailureCallback_86)); return CHIP_NO_ERROR; } - void OnFailureResponse_128(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_86(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_128() { NextTest(); } + void OnSuccessResponse_86() { NextTest(); } - CHIP_ERROR TestReadAttributeListLongOctetString_129() + CHIP_ERROR TestReadAttributeSingleDefaultValue_87() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_129, OnFailureCallback_129)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_87, OnFailureCallback_87)); return CHIP_NO_ERROR; } - void OnFailureResponse_129(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_87(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_129(const chip::app::DataModel::DecodableList & listLongOctetString) + void OnSuccessResponse_87(float floatSingle) { - auto iter = listLongOctetString.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter, 0)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[0]", iter.GetValue(), - chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter, 1)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[1]", iter.GetValue(), - chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter, 2)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[2]", iter.GetValue(), - chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter, 3)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[3]", iter.GetValue(), - chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNoMoreListItems("listLongOctetString", iter, 4)); + VerifyOrReturn(CheckValue("floatSingle", floatSingle, 0.0f)); NextTest(); } - CHIP_ERROR TestReadAttributeEpochUsDefaultValue_130() + CHIP_ERROR TestReadAttributeDoubleDefaultValue_88() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_130, OnFailureCallback_130)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_88, OnFailureCallback_88)); return CHIP_NO_ERROR; } - void OnFailureResponse_130(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_88(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_130(uint64_t epochUs) + void OnSuccessResponse_88(double floatDouble) { - VerifyOrReturn(CheckValue("epochUs", epochUs, 0ULL)); + VerifyOrReturn(CheckValue("floatDouble", floatDouble, 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeEpochUsMaxValue_131() + CHIP_ERROR TestWriteAttributeDoubleMediumValue_89() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint64_t epochUsArgument; - epochUsArgument = 18446744073709551615ULL; + double floatDoubleArgument; + floatDoubleArgument = 0.1234567890123; - ReturnErrorOnFailure(cluster.WriteAttribute( - epochUsArgument, this, OnSuccessCallback_131, OnFailureCallback_131)); + ReturnErrorOnFailure(cluster.WriteAttribute( + floatDoubleArgument, this, OnSuccessCallback_89, OnFailureCallback_89)); return CHIP_NO_ERROR; } - void OnFailureResponse_131(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_89(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_131() { NextTest(); } + void OnSuccessResponse_89() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochUsMaxValue_132() + CHIP_ERROR TestReadAttributeDoubleMediumValue_90() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_132, OnFailureCallback_132)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_90, OnFailureCallback_90)); return CHIP_NO_ERROR; } - void OnFailureResponse_132(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_90(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_132(uint64_t epochUs) + void OnSuccessResponse_90(double floatDouble) { - VerifyOrReturn(CheckValue("epochUs", epochUs, 18446744073709551615ULL)); + VerifyOrReturn(CheckValue("floatDouble", floatDouble, 0.1234567890123)); NextTest(); } - CHIP_ERROR TestWriteAttributeEpochUsMinValue_133() + CHIP_ERROR TestWriteAttributeDoubleLargeValue_91() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint64_t epochUsArgument; - epochUsArgument = 0ULL; - - ReturnErrorOnFailure(cluster.WriteAttribute( - epochUsArgument, this, OnSuccessCallback_133, OnFailureCallback_133)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_133(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_133() { NextTest(); } - - CHIP_ERROR TestReadAttributeEpochUsMinValue_134() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + double floatDoubleArgument; + floatDoubleArgument = 1.7e+200; - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_134, OnFailureCallback_134)); + ReturnErrorOnFailure(cluster.WriteAttribute( + floatDoubleArgument, this, OnSuccessCallback_91, OnFailureCallback_91)); return CHIP_NO_ERROR; } - void OnFailureResponse_134(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_134(uint64_t epochUs) - { - VerifyOrReturn(CheckValue("epochUs", epochUs, 0ULL)); + void OnFailureResponse_91(EmberAfStatus status) { ThrowFailureResponse(); } - NextTest(); - } + void OnSuccessResponse_91() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochSDefaultValue_135() + CHIP_ERROR TestReadAttributeDoubleLargeValue_92() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_135, OnFailureCallback_135)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_92, OnFailureCallback_92)); return CHIP_NO_ERROR; } - void OnFailureResponse_135(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_92(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_135(uint32_t epochS) + void OnSuccessResponse_92(double floatDouble) { - VerifyOrReturn(CheckValue("epochS", epochS, 0UL)); + VerifyOrReturn(CheckValue("floatDouble", floatDouble, 1.7e+200)); NextTest(); } - CHIP_ERROR TestWriteAttributeEpochSMaxValue_136() + CHIP_ERROR TestWriteAttributeDoubleSmallValue_93() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t epochSArgument; - epochSArgument = 4294967295UL; + double floatDoubleArgument; + floatDoubleArgument = 1.7e-200; - ReturnErrorOnFailure(cluster.WriteAttribute( - epochSArgument, this, OnSuccessCallback_136, OnFailureCallback_136)); + ReturnErrorOnFailure(cluster.WriteAttribute( + floatDoubleArgument, this, OnSuccessCallback_93, OnFailureCallback_93)); return CHIP_NO_ERROR; } - void OnFailureResponse_136(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_93(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_136() { NextTest(); } + void OnSuccessResponse_93() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochSMaxValue_137() + CHIP_ERROR TestReadAttributeDoubleSmallValue_94() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_137, OnFailureCallback_137)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_94, OnFailureCallback_94)); return CHIP_NO_ERROR; } - void OnFailureResponse_137(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_94(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_137(uint32_t epochS) + void OnSuccessResponse_94(double floatDouble) { - VerifyOrReturn(CheckValue("epochS", epochS, 4294967295UL)); + VerifyOrReturn(CheckValue("floatDouble", floatDouble, 1.7e-200)); NextTest(); } - CHIP_ERROR TestWriteAttributeEpochSMinValue_138() + CHIP_ERROR TestWriteAttributeDoubleDefaultValue_95() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t epochSArgument; - epochSArgument = 0UL; + double floatDoubleArgument; + floatDoubleArgument = 0; - ReturnErrorOnFailure(cluster.WriteAttribute( - epochSArgument, this, OnSuccessCallback_138, OnFailureCallback_138)); + ReturnErrorOnFailure(cluster.WriteAttribute( + floatDoubleArgument, this, OnSuccessCallback_95, OnFailureCallback_95)); return CHIP_NO_ERROR; } - void OnFailureResponse_138(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_95(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_138() { NextTest(); } + void OnSuccessResponse_95() { NextTest(); } - CHIP_ERROR TestReadAttributeEpochSMinValue_139() + CHIP_ERROR TestReadAttributeDoubleDefaultValue_96() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_139, OnFailureCallback_139)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_96, OnFailureCallback_96)); return CHIP_NO_ERROR; } - void OnFailureResponse_139(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_96(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_139(uint32_t epochS) + void OnSuccessResponse_96(double floatDouble) { - VerifyOrReturn(CheckValue("epochS", epochS, 0UL)); + VerifyOrReturn(CheckValue("floatDouble", floatDouble, 0)); NextTest(); } - CHIP_ERROR TestReadAttributeUnsupported_140() + CHIP_ERROR TestReadAttributeEnum8DefaultValue_97() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_140, OnFailureCallback_140)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_97, OnFailureCallback_97)); return CHIP_NO_ERROR; } - void OnFailureResponse_140(EmberAfStatus status) - { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + void OnFailureResponse_97(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_140(bool unsupported) + void OnSuccessResponse_97(uint8_t enum8) { - VerifyOrReturn(CheckValue("unsupported", unsupported, 0)); + VerifyOrReturn(CheckValue("enum8", enum8, 0)); NextTest(); } - CHIP_ERROR TestWriteattributeUnsupported_141() + CHIP_ERROR TestWriteAttributeEnum8MaxValue_98() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - bool unsupportedArgument; - unsupportedArgument = 0; + uint8_t enum8Argument; + enum8Argument = 255; - ReturnErrorOnFailure(cluster.WriteAttribute( - unsupportedArgument, this, OnSuccessCallback_141, OnFailureCallback_141)); + ReturnErrorOnFailure(cluster.WriteAttribute( + enum8Argument, this, OnSuccessCallback_98, OnFailureCallback_98)); return CHIP_NO_ERROR; } - void OnFailureResponse_141(EmberAfStatus status) - { - (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); - } + void OnFailureResponse_98(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_141() { NextTest(); } + void OnSuccessResponse_98() { NextTest(); } - CHIP_ERROR TestSendTestCommandToUnsupportedEndpoint_142() + CHIP_ERROR TestReadAttributeEnum8MaxValue_99() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 200; - using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; - - RequestType request; - - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_142(); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_142(status); - }; + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_99, OnFailureCallback_99)); return CHIP_NO_ERROR; } - void OnFailureResponse_142(EmberAfStatus status) + void OnFailureResponse_99(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_99(uint8_t enum8) { - VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + VerifyOrReturn(CheckValue("enum8", enum8, 255)); + NextTest(); } - void OnSuccessResponse_142() { ThrowSuccessResponse(); } - - CHIP_ERROR TestSendTestCommandToUnsupportedCluster_143() + CHIP_ERROR TestWriteAttributeEnum8MinValue_100() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; - using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; - - RequestType request; - - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_143(); - }; + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_143(status); - }; + uint8_t enum8Argument; + enum8Argument = 0; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure(cluster.WriteAttribute( + enum8Argument, this, OnSuccessCallback_100, OnFailureCallback_100)); return CHIP_NO_ERROR; } - void OnFailureResponse_143(EmberAfStatus status) - { - VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); - NextTest(); - } + void OnFailureResponse_100(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_143() { ThrowSuccessResponse(); } + void OnSuccessResponse_100() { NextTest(); } - CHIP_ERROR TestReadAttributeVendorIdDefaultValue_144() + CHIP_ERROR TestReadAttributeEnum8MinValue_101() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_144, OnFailureCallback_144)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_101, OnFailureCallback_101)); return CHIP_NO_ERROR; } - void OnFailureResponse_144(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_101(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_144(chip::VendorId vendorId) + void OnSuccessResponse_101(uint8_t enum8) { - VerifyOrReturn(CheckValue("vendorId", vendorId, 0U)); + VerifyOrReturn(CheckValue("enum8", enum8, 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeVendorId_145() + CHIP_ERROR TestReadAttributeEnum16DefaultValue_102() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::VendorId vendorIdArgument; - vendorIdArgument = static_cast(17); - - ReturnErrorOnFailure(cluster.WriteAttribute( - vendorIdArgument, this, OnSuccessCallback_145, OnFailureCallback_145)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_102, OnFailureCallback_102)); return CHIP_NO_ERROR; } - void OnFailureResponse_145(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_102(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_145() { NextTest(); } + void OnSuccessResponse_102(uint16_t enum16) + { + VerifyOrReturn(CheckValue("enum16", enum16, 0U)); - CHIP_ERROR TestReadAttributeVendorId_146() + NextTest(); + } + + CHIP_ERROR TestWriteAttributeEnum16MaxValue_103() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_146, OnFailureCallback_146)); - return CHIP_NO_ERROR; - } + uint16_t enum16Argument; + enum16Argument = 65535U; - void OnFailureResponse_146(EmberAfStatus status) { ThrowFailureResponse(); } + ReturnErrorOnFailure(cluster.WriteAttribute( + enum16Argument, this, OnSuccessCallback_103, OnFailureCallback_103)); + return CHIP_NO_ERROR; + } - void OnSuccessResponse_146(chip::VendorId vendorId) + void OnFailureResponse_103(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_103() { NextTest(); } + + CHIP_ERROR TestReadAttributeEnum16MaxValue_104() { - VerifyOrReturn(CheckValue("vendorId", vendorId, 17U)); + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_104, OnFailureCallback_104)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_104(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_104(uint16_t enum16) + { + VerifyOrReturn(CheckValue("enum16", enum16, 65535U)); NextTest(); } - CHIP_ERROR TestRestoreAttributeVendorId_147() + CHIP_ERROR TestWriteAttributeEnum16MinValue_105() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::VendorId vendorIdArgument; - vendorIdArgument = static_cast(0); + uint16_t enum16Argument; + enum16Argument = 0U; - ReturnErrorOnFailure(cluster.WriteAttribute( - vendorIdArgument, this, OnSuccessCallback_147, OnFailureCallback_147)); + ReturnErrorOnFailure(cluster.WriteAttribute( + enum16Argument, this, OnSuccessCallback_105, OnFailureCallback_105)); return CHIP_NO_ERROR; } - void OnFailureResponse_147(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_105(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_147() { NextTest(); } + void OnSuccessResponse_105() { NextTest(); } - CHIP_ERROR TestSendACommandWithAVendorIdAndEnum_148() + CHIP_ERROR TestReadAttributeEnum16MinValue_106() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type; - - RequestType request; - request.arg1 = static_cast(20003); - request.arg2 = static_cast(101); - - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_148(data.arg1, data.arg2); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_148(status); - }; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_106, OnFailureCallback_106)); return CHIP_NO_ERROR; } - void OnFailureResponse_148(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_106(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_148(chip::VendorId arg1, chip::app::Clusters::TestCluster::SimpleEnum arg2) + void OnSuccessResponse_106(uint16_t enum16) { - VerifyOrReturn(CheckValue("arg1", arg1, 20003U)); - - VerifyOrReturn(CheckValue("arg2", arg2, 101)); + VerifyOrReturn(CheckValue("enum16", enum16, 0U)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_149() + CHIP_ERROR TestReadAttributeOctetStringDefaultValue_107() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; - - RequestType request; - - request.arg1.a = 0; - request.arg1.b = true; - request.arg1.c = static_cast(2); - request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.f = static_cast>(1); - request.arg1.g = 0.0f; - request.arg1.h = 0; - - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_149(data.value); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_149(status); - }; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_107, OnFailureCallback_107)); return CHIP_NO_ERROR; } - void OnFailureResponse_149(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_107(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_149(bool value) + void OnSuccessResponse_107(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValue("value", value, true)); + VerifyOrReturn(CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); NextTest(); } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_150() + CHIP_ERROR TestWriteAttributeOctetStringWithEmbeddedNull_108() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::ByteSpan octetStringArgument; + octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("Tes\x00ti\x00nggarbage: not in length on purpose"), 9); - request.arg1.a = 0; - request.arg1.b = false; - request.arg1.c = static_cast(2); - request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.f = static_cast>(1); - request.arg1.g = 0.0f; - request.arg1.h = 0; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_108, OnFailureCallback_108)); + return CHIP_NO_ERROR; + } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_150(data.value); - }; + void OnFailureResponse_108(EmberAfStatus status) { ThrowFailureResponse(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_150(status); - }; + void OnSuccessResponse_108() { NextTest(); } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + CHIP_ERROR TestReadAttributeOctetStringWithEmbeddedNull_109() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_109, OnFailureCallback_109)); return CHIP_NO_ERROR; } - void OnFailureResponse_150(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_109(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_150(bool value) + void OnSuccessResponse_109(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValue("value", value, false)); + VerifyOrReturn( + CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("Tes\x00ti\x00ng"), 9))); NextTest(); } - CHIP_ERROR TestSendTestCommandWithNestedStructArgumentAndArg1cbIsTrue_151() + CHIP_ERROR TestWriteAttributeOctetString_110() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::ByteSpan octetStringArgument; + octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); - request.arg1.a = 0; - request.arg1.b = true; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_110, OnFailureCallback_110)); + return CHIP_NO_ERROR; + } - request.arg1.c.a = 0; - request.arg1.c.b = true; - request.arg1.c.c = static_cast(2); - request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.c.f = static_cast>(1); - request.arg1.c.g = 0.0f; - request.arg1.c.h = 0; + void OnFailureResponse_110(EmberAfStatus status) { ThrowFailureResponse(); } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_151(data.value); - }; + void OnSuccessResponse_110() { NextTest(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_151(status); - }; + CHIP_ERROR TestReadAttributeOctetString_111() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_111, OnFailureCallback_111)); return CHIP_NO_ERROR; } - void OnFailureResponse_151(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_111(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_151(bool value) + void OnSuccessResponse_111(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValue("value", value, true)); + VerifyOrReturn( + CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); NextTest(); } - CHIP_ERROR TestSendTestCommandWithNestedStructArgumentArg1cbIsFalse_152() + CHIP_ERROR TestWriteAttributeOctetString_112() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::ByteSpan octetStringArgument; + octetStringArgument = + chip::ByteSpan(chip::Uint8::from_const_char("TestValueLongerThan10garbage: not in length on purpose"), 21); - request.arg1.a = 0; - request.arg1.b = true; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_112, OnFailureCallback_112)); + return CHIP_NO_ERROR; + } - request.arg1.c.a = 0; - request.arg1.c.b = false; - request.arg1.c.c = static_cast(2); - request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.c.f = static_cast>(1); - request.arg1.c.g = 0.0f; - request.arg1.c.h = 0; + void OnFailureResponse_112(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_152(data.value); - }; + void OnSuccessResponse_112() { ThrowSuccessResponse(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_152(status); - }; + CHIP_ERROR TestReadAttributeOctetString_113() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_113, OnFailureCallback_113)); return CHIP_NO_ERROR; } - void OnFailureResponse_152(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_113(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_152(bool value) + void OnSuccessResponse_113(chip::ByteSpan octetString) { - VerifyOrReturn(CheckValue("value", value, false)); + VerifyOrReturn( + CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); NextTest(); } - CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndAllFieldsBOfArg1dAreTrue_153() + CHIP_ERROR TestWriteAttributeOctetString_114() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::ByteSpan octetStringArgument; + octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - request.arg1.a = 0; - request.arg1.b = true; + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_114, OnFailureCallback_114)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_114(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_114() { NextTest(); } + + CHIP_ERROR TestReadAttributeLongOctetStringDefaultValue_115() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_115, OnFailureCallback_115)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_115(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_115(chip::ByteSpan longOctetString) + { + VerifyOrReturn(CheckValueAsString("longOctetString", longOctetString, chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeLongOctetString_116() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::ByteSpan longOctetStringArgument; + longOctetStringArgument = chip::ByteSpan( + chip::Uint8::from_const_char( + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "111111111111111111111111111111111111111111111111111111111111111111111111garbage: not in length on purpose"), + 300); + + ReturnErrorOnFailure(cluster.WriteAttribute( + longOctetStringArgument, this, OnSuccessCallback_116, OnFailureCallback_116)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_116(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_116() { NextTest(); } + + CHIP_ERROR TestReadAttributeLongOctetString_117() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_117, OnFailureCallback_117)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_117(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_117(chip::ByteSpan longOctetString) + { + VerifyOrReturn(CheckValueAsString( + "longOctetString", longOctetString, + chip::ByteSpan( + chip::Uint8::from_const_char( + "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "11111111111111111111111111111111111111111111111111111111111111111111111111111111"), + 300))); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeLongOctetString_118() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::ByteSpan longOctetStringArgument; + longOctetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + + ReturnErrorOnFailure(cluster.WriteAttribute( + longOctetStringArgument, this, OnSuccessCallback_118, OnFailureCallback_118)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_118(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_118() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringDefaultValue_119() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_119, OnFailureCallback_119)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_119(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_119(chip::CharSpan charString) + { + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("", 0))); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharString_120() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("☉T☉garbage: not in length on purpose", 7); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_120, OnFailureCallback_120)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_120(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_120() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharString_121() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_121, OnFailureCallback_121)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_121(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_121(chip::CharSpan charString) + { + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("☉T☉", 7))); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringValueTooLong_122() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("☉TestValueLongerThan10☉garbage: not in length on purpose", 27); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_122, OnFailureCallback_122)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_122(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_122() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeCharString_123() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_123, OnFailureCallback_123)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_123(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_123(chip::CharSpan charString) + { + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("☉T☉", 7))); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringEmpty_124() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("garbage: not in length on purpose", 0); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_124, OnFailureCallback_124)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_124(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_124() { NextTest(); } + + CHIP_ERROR TestReadAttributeLongCharStringDefaultValue_125() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_125, OnFailureCallback_125)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_125(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_125(chip::CharSpan longCharString) + { + VerifyOrReturn(CheckValueAsString("longCharString", longCharString, chip::CharSpan("", 0))); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeLongCharString_126() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan longCharStringArgument; + longCharStringArgument = chip::Span( + "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" + "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" + "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉garbage: not in length on purpose", + 900); + + ReturnErrorOnFailure(cluster.WriteAttribute( + longCharStringArgument, this, OnSuccessCallback_126, OnFailureCallback_126)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_126(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_126() { NextTest(); } + + CHIP_ERROR TestReadAttributeLongCharString_127() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_127, OnFailureCallback_127)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_127(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_127(chip::CharSpan longCharString) + { + VerifyOrReturn(CheckValueAsString( + "longCharString", longCharString, + chip::CharSpan("☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" + "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" + "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉", + 900))); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeLongCharString_128() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan longCharStringArgument; + longCharStringArgument = chip::Span("garbage: not in length on purpose", 0); + + ReturnErrorOnFailure(cluster.WriteAttribute( + longCharStringArgument, this, OnSuccessCallback_128, OnFailureCallback_128)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_128(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_128() { NextTest(); } + + CHIP_ERROR TestReadAttributeListLongOctetString_129() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_129, OnFailureCallback_129)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_129(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_129(const chip::app::DataModel::DecodableList & listLongOctetString) + { + auto iter = listLongOctetString.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter, 0)); + VerifyOrReturn(CheckValueAsString( + "listLongOctetString[0]", iter.GetValue(), + chip::ByteSpan( + chip::Uint8::from_const_char( + "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" + "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" + "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" + "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" + "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), + 512))); + VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter, 1)); + VerifyOrReturn(CheckValueAsString( + "listLongOctetString[1]", iter.GetValue(), + chip::ByteSpan( + chip::Uint8::from_const_char( + "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" + "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" + "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" + "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" + "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), + 512))); + VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter, 2)); + VerifyOrReturn(CheckValueAsString( + "listLongOctetString[2]", iter.GetValue(), + chip::ByteSpan( + chip::Uint8::from_const_char( + "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" + "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" + "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" + "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" + "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), + 512))); + VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter, 3)); + VerifyOrReturn(CheckValueAsString( + "listLongOctetString[3]", iter.GetValue(), + chip::ByteSpan( + chip::Uint8::from_const_char( + "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" + "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" + "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" + "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" + "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), + 512))); + VerifyOrReturn(CheckNoMoreListItems("listLongOctetString", iter, 4)); + + NextTest(); + } + + CHIP_ERROR TestReadAttributeEpochUsDefaultValue_130() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_130, OnFailureCallback_130)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_130(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_130(uint64_t epochUs) + { + VerifyOrReturn(CheckValue("epochUs", epochUs, 0ULL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeEpochUsMaxValue_131() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint64_t epochUsArgument; + epochUsArgument = 18446744073709551615ULL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + epochUsArgument, this, OnSuccessCallback_131, OnFailureCallback_131)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_131(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_131() { NextTest(); } + + CHIP_ERROR TestReadAttributeEpochUsMaxValue_132() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_132, OnFailureCallback_132)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_132(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_132(uint64_t epochUs) + { + VerifyOrReturn(CheckValue("epochUs", epochUs, 18446744073709551615ULL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeEpochUsMinValue_133() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint64_t epochUsArgument; + epochUsArgument = 0ULL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + epochUsArgument, this, OnSuccessCallback_133, OnFailureCallback_133)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_133(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_133() { NextTest(); } + + CHIP_ERROR TestReadAttributeEpochUsMinValue_134() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_134, OnFailureCallback_134)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_134(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_134(uint64_t epochUs) + { + VerifyOrReturn(CheckValue("epochUs", epochUs, 0ULL)); + + NextTest(); + } + + CHIP_ERROR TestReadAttributeEpochSDefaultValue_135() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_135, OnFailureCallback_135)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_135(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_135(uint32_t epochS) + { + VerifyOrReturn(CheckValue("epochS", epochS, 0UL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeEpochSMaxValue_136() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint32_t epochSArgument; + epochSArgument = 4294967295UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + epochSArgument, this, OnSuccessCallback_136, OnFailureCallback_136)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_136(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_136() { NextTest(); } + + CHIP_ERROR TestReadAttributeEpochSMaxValue_137() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_137, OnFailureCallback_137)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_137(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_137(uint32_t epochS) + { + VerifyOrReturn(CheckValue("epochS", epochS, 4294967295UL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeEpochSMinValue_138() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint32_t epochSArgument; + epochSArgument = 0UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + epochSArgument, this, OnSuccessCallback_138, OnFailureCallback_138)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_138(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_138() { NextTest(); } + + CHIP_ERROR TestReadAttributeEpochSMinValue_139() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_139, OnFailureCallback_139)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_139(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_139(uint32_t epochS) + { + VerifyOrReturn(CheckValue("epochS", epochS, 0UL)); + + NextTest(); + } + + CHIP_ERROR TestReadAttributeUnsupported_140() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_140, OnFailureCallback_140)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_140(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_140(bool unsupported) + { + VerifyOrReturn(CheckValue("unsupported", unsupported, 0)); + + NextTest(); + } + + CHIP_ERROR TestWriteattributeUnsupported_141() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + bool unsupportedArgument; + unsupportedArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + unsupportedArgument, this, OnSuccessCallback_141, OnFailureCallback_141)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_141(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_141() { NextTest(); } + + CHIP_ERROR TestSendTestCommandToUnsupportedEndpoint_142() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 200; + using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; + + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_142(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_142(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_142(EmberAfStatus status) + { + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + NextTest(); + } + + void OnSuccessResponse_142() { ThrowSuccessResponse(); } + + CHIP_ERROR TestSendTestCommandToUnsupportedCluster_143() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; + + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_143(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_143(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_143(EmberAfStatus status) + { + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + NextTest(); + } + + void OnSuccessResponse_143() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeVendorIdDefaultValue_144() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_144, OnFailureCallback_144)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_144(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_144(chip::VendorId vendorId) + { + VerifyOrReturn(CheckValue("vendorId", vendorId, 0U)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeVendorId_145() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::VendorId vendorIdArgument; + vendorIdArgument = static_cast(17); + + ReturnErrorOnFailure(cluster.WriteAttribute( + vendorIdArgument, this, OnSuccessCallback_145, OnFailureCallback_145)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_145(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_145() { NextTest(); } + + CHIP_ERROR TestReadAttributeVendorId_146() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_146, OnFailureCallback_146)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_146(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_146(chip::VendorId vendorId) + { + VerifyOrReturn(CheckValue("vendorId", vendorId, 17U)); + + NextTest(); + } + + CHIP_ERROR TestRestoreAttributeVendorId_147() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::VendorId vendorIdArgument; + vendorIdArgument = static_cast(0); + + ReturnErrorOnFailure(cluster.WriteAttribute( + vendorIdArgument, this, OnSuccessCallback_147, OnFailureCallback_147)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_147(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_147() { NextTest(); } + + CHIP_ERROR TestSendACommandWithAVendorIdAndEnum_148() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type; + + RequestType request; + request.arg1 = static_cast(20003); + request.arg2 = static_cast(101); + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_148(data.arg1, data.arg2); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_148(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_148(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_148(chip::VendorId arg1, chip::app::Clusters::TestCluster::SimpleEnum arg2) + { + VerifyOrReturn(CheckValue("arg1", arg1, 20003U)); + + VerifyOrReturn(CheckValue("arg2", arg2, 101)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_149() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; + + RequestType request; + + request.arg1.a = 0; + request.arg1.b = true; + request.arg1.c = static_cast(2); + request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.f = static_cast>(1); + request.arg1.g = 0.0f; + request.arg1.h = 0; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_149(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_149(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_149(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_149(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_150() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; + + RequestType request; + + request.arg1.a = 0; + request.arg1.b = false; + request.arg1.c = static_cast(2); + request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.f = static_cast>(1); + request.arg1.g = 0.0f; + request.arg1.h = 0; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_150(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_150(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_150(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_150(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithNestedStructArgumentAndArg1cbIsTrue_151() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; + + RequestType request; + + request.arg1.a = 0; + request.arg1.b = true; + + request.arg1.c.a = 0; + request.arg1.c.b = true; + request.arg1.c.c = static_cast(2); + request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.c.f = static_cast>(1); + request.arg1.c.g = 0.0f; + request.arg1.c.h = 0; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_151(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_151(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_151(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_151(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithNestedStructArgumentArg1cbIsFalse_152() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; + + RequestType request; + + request.arg1.a = 0; + request.arg1.b = true; + + request.arg1.c.a = 0; + request.arg1.c.b = false; + request.arg1.c.c = static_cast(2); + request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.c.f = static_cast>(1); + request.arg1.c.g = 0.0f; + request.arg1.c.h = 0; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_152(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_152(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_152(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_152(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndAllFieldsBOfArg1dAreTrue_153() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; + + RequestType request; + + request.arg1.a = 0; + request.arg1.b = true; + + request.arg1.c.a = 0; + request.arg1.c.b = true; + request.arg1.c.c = static_cast(2); + request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.c.f = static_cast>(1); + request.arg1.c.g = 0.0f; + request.arg1.c.h = 0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; + + dList[0].a = 1; + dList[0].b = true; + dList[0].c = static_cast(3); + dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[0].f = static_cast>(1); + dList[0].g = 0.0f; + dList[0].h = 0; + + dList[1].a = 2; + dList[1].b = true; + dList[1].c = static_cast(3); + dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[1].f = static_cast>(1); + dList[1].g = 0.0f; + dList[1].h = 0; + + request.arg1.d = dList; + + uint32_t eList[3]; + eList[0] = 1UL; + eList[1] = 2UL; + eList[2] = 3UL; + request.arg1.e = eList; + + chip::ByteSpan fList[3]; + fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + request.arg1.f = fList; + + uint8_t gList[2]; + gList[0] = 0; + gList[1] = 255; + request.arg1.g = gList; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_153(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_153(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_153(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_153(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfArg1dAreFalse_154() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; + + RequestType request; + + request.arg1.a = 0; + request.arg1.b = true; request.arg1.c.a = 0; request.arg1.c.b = true; @@ -41045,3510 +42504,5595 @@ class TestCluster : public TestCommand request.arg1.c.g = 0.0f; request.arg1.c.h = 0; - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; + + dList[0].a = 1; + dList[0].b = true; + dList[0].c = static_cast(3); + dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[0].f = static_cast>(1); + dList[0].g = 0.0f; + dList[0].h = 0; + + dList[1].a = 2; + dList[1].b = false; + dList[1].c = static_cast(3); + dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[1].f = static_cast>(1); + dList[1].g = 0.0f; + dList[1].h = 0; + + request.arg1.d = dList; + + uint32_t eList[3]; + eList[0] = 1UL; + eList[1] = 2UL; + eList[2] = 3UL; + request.arg1.e = eList; + + chip::ByteSpan fList[3]; + fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + request.arg1.f = fList; + + uint8_t gList[2]; + gList[0] = 0; + gList[1] = 255; + request.arg1.g = gList; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_154(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_154(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_154(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_154(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_155() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type; + + RequestType request; + + request.arg1.a = 17; + request.arg1.b = false; + request.arg1.c = static_cast(2); + request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.f = static_cast>(1); + request.arg1.g = 0.1f; + request.arg1.h = 0.1; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_155(data.arg1); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_155(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_155(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_155(const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & arg1) + { + VerifyOrReturn(CheckValue("arg1.a", arg1.a, 17)); + VerifyOrReturn(CheckValue("arg1.b", arg1.b, false)); + VerifyOrReturn(CheckValue("arg1.c", arg1.c, 2)); + VerifyOrReturn(CheckValueAsString("arg1.d", arg1.d, chip::ByteSpan(chip::Uint8::from_const_char("octet_string"), 12))); + VerifyOrReturn(CheckValueAsString("arg1.e", arg1.e, chip::CharSpan("char_string", 11))); + VerifyOrReturn(CheckValue("arg1.f", arg1.f, 1)); + VerifyOrReturn(CheckValue("arg1.g", arg1.g, 0.1f)); + VerifyOrReturn(CheckValue("arg1.h", arg1.h, 0.1)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_156() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; + + RequestType request; + + uint8_t arg1List[9]; + arg1List[0] = 1; + arg1List[1] = 2; + arg1List[2] = 3; + arg1List[3] = 4; + arg1List[4] = 5; + arg1List[5] = 6; + arg1List[6] = 7; + arg1List[7] = 8; + arg1List[8] = 9; + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_156(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_156(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_156(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_156(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_157() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; + + RequestType request; + + uint8_t arg1List[10]; + arg1List[0] = 1; + arg1List[1] = 2; + arg1List[2] = 3; + arg1List[3] = 4; + arg1List[4] = 5; + arg1List[5] = 6; + arg1List[6] = 7; + arg1List[7] = 8; + arg1List[8] = 9; + arg1List[9] = 0; + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_157(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_157(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_157(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_157(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_158() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + + RequestType request; + + uint8_t arg1List[9]; + arg1List[0] = 1; + arg1List[1] = 2; + arg1List[2] = 3; + arg1List[3] = 4; + arg1List[4] = 5; + arg1List[5] = 6; + arg1List[6] = 7; + arg1List[7] = 8; + arg1List[8] = 9; + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_158(data.arg1); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_158(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_158(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_158(const chip::app::DataModel::DecodableList & arg1) + { + auto iter = arg1.begin(); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 0)); + VerifyOrReturn(CheckValue("arg1[0]", iter.GetValue(), 9)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 1)); + VerifyOrReturn(CheckValue("arg1[1]", iter.GetValue(), 8)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 2)); + VerifyOrReturn(CheckValue("arg1[2]", iter.GetValue(), 7)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 3)); + VerifyOrReturn(CheckValue("arg1[3]", iter.GetValue(), 6)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 4)); + VerifyOrReturn(CheckValue("arg1[4]", iter.GetValue(), 5)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 5)); + VerifyOrReturn(CheckValue("arg1[5]", iter.GetValue(), 4)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 6)); + VerifyOrReturn(CheckValue("arg1[6]", iter.GetValue(), 3)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 7)); + VerifyOrReturn(CheckValue("arg1[7]", iter.GetValue(), 2)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 8)); + VerifyOrReturn(CheckValue("arg1[8]", iter.GetValue(), 1)); + VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 9)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_159() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + + RequestType request; + + request.arg1 = chip::app::DataModel::List(); + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_159(data.arg1); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_159(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_159(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_159(const chip::app::DataModel::DecodableList & arg1) + { + auto iter = arg1.begin(); + VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 0)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_160() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; + + RequestType request; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List[2]; + + arg1List[0].a = 0; + arg1List[0].b = true; + arg1List[0].c = static_cast(2); + arg1List[0].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); + arg1List[0].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); + arg1List[0].f = static_cast>(1); + arg1List[0].g = 0.0f; + arg1List[0].h = 0; + + arg1List[1].a = 1; + arg1List[1].b = true; + arg1List[1].c = static_cast(3); + arg1List[1].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); + arg1List[1].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); + arg1List[1].f = static_cast>(1); + arg1List[1].g = 0.0f; + arg1List[1].h = 0; + + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_160(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_160(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_160(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_160(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_161() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; + + RequestType request; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List[2]; + + arg1List[0].a = 1; + arg1List[0].b = true; + arg1List[0].c = static_cast(3); + arg1List[0].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); + arg1List[0].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); + arg1List[0].f = static_cast>(1); + arg1List[0].g = 0.0f; + arg1List[0].h = 0; + + arg1List[1].a = 0; + arg1List[1].b = false; + arg1List[1].c = static_cast(2); + arg1List[1].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); + arg1List[1].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); + arg1List[1].f = static_cast>(1); + arg1List[1].g = 0.0f; + arg1List[1].h = 0; + + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_161(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_161(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_161(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_161(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_162() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; + + RequestType request; + + chip::app::Clusters::TestCluster::Structs::NestedStructList::Type arg1List[1]; + + arg1List[0].a = 0; + arg1List[0].b = true; + + arg1List[0].c.a = 0; + arg1List[0].c.b = true; + arg1List[0].c.c = static_cast(2); + arg1List[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + arg1List[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + arg1List[0].c.f = static_cast>(1); + arg1List[0].c.g = 0.0f; + arg1List[0].c.h = 0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; + + dList[0].a = 1; + dList[0].b = true; + dList[0].c = static_cast(3); + dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[0].f = static_cast>(1); + dList[0].g = 0.0f; + dList[0].h = 0; + + dList[1].a = 2; + dList[1].b = true; + dList[1].c = static_cast(3); + dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[1].f = static_cast>(1); + dList[1].g = 0.0f; + dList[1].h = 0; + + arg1List[0].d = dList; + + uint32_t eList[3]; + eList[0] = 1UL; + eList[1] = 2UL; + eList[2] = 3UL; + arg1List[0].e = eList; + + chip::ByteSpan fList[3]; + fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + arg1List[0].f = fList; + + uint8_t gList[2]; + gList[0] = 0; + gList[1] = 255; + arg1List[0].g = gList; + + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_162(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_162(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_162(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_162(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_163() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; + + RequestType request; + + chip::app::Clusters::TestCluster::Structs::NestedStructList::Type arg1List[1]; + + arg1List[0].a = 0; + arg1List[0].b = true; + + arg1List[0].c.a = 0; + arg1List[0].c.b = true; + arg1List[0].c.c = static_cast(2); + arg1List[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + arg1List[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + arg1List[0].c.f = static_cast>(1); + arg1List[0].c.g = 0.0f; + arg1List[0].c.h = 0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; + + dList[0].a = 1; + dList[0].b = true; + dList[0].c = static_cast(3); + dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[0].f = static_cast>(1); + dList[0].g = 0.0f; + dList[0].h = 0; + + dList[1].a = 2; + dList[1].b = false; + dList[1].c = static_cast(3); + dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[1].f = static_cast>(1); + dList[1].g = 0.0f; + dList[1].h = 0; + + arg1List[0].d = dList; + + uint32_t eList[3]; + eList[0] = 1UL; + eList[1] = 2UL; + eList[2] = 3UL; + arg1List[0].e = eList; + + chip::ByteSpan fList[3]; + fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + arg1List[0].f = fList; + + uint8_t gList[2]; + gList[0] = 0; + gList[1] = 255; + arg1List[0].g = gList; + + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_163(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_163(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_163(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_163(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_164() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::List listInt8uArgument; + + uint8_t listInt8uList[4]; + listInt8uList[0] = 1; + listInt8uList[1] = 2; + listInt8uList[2] = 3; + listInt8uList[3] = 4; + listInt8uArgument = listInt8uList; + + ReturnErrorOnFailure(cluster.WriteAttribute( + listInt8uArgument, this, OnSuccessCallback_164, OnFailureCallback_164)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_164(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_164() { NextTest(); } + + CHIP_ERROR TestReadAttributeListWithListOfInt8u_165() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_165, OnFailureCallback_165)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_165(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_165(const chip::app::DataModel::DecodableList & listInt8u) + { + auto iter = listInt8u.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 0)); + VerifyOrReturn(CheckValue("listInt8u[0]", iter.GetValue(), 1)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 1)); + VerifyOrReturn(CheckValue("listInt8u[1]", iter.GetValue(), 2)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 2)); + VerifyOrReturn(CheckValue("listInt8u[2]", iter.GetValue(), 3)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 3)); + VerifyOrReturn(CheckValue("listInt8u[3]", iter.GetValue(), 4)); + VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter, 4)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeListWithListOfOctetString_166() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::List listOctetStringArgument; + + chip::ByteSpan listOctetStringList[4]; + listOctetStringList[0] = chip::ByteSpan(chip::Uint8::from_const_char("Test0garbage: not in length on purpose"), 5); + listOctetStringList[1] = chip::ByteSpan(chip::Uint8::from_const_char("Test1garbage: not in length on purpose"), 5); + listOctetStringList[2] = chip::ByteSpan(chip::Uint8::from_const_char("Test2garbage: not in length on purpose"), 5); + listOctetStringList[3] = chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5); + listOctetStringArgument = listOctetStringList; + + ReturnErrorOnFailure(cluster.WriteAttribute( + listOctetStringArgument, this, OnSuccessCallback_166, OnFailureCallback_166)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_166(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_166() { NextTest(); } + + CHIP_ERROR TestReadAttributeListWithListOfOctetString_167() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_167, OnFailureCallback_167)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_167(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_167(const chip::app::DataModel::DecodableList & listOctetString) + { + auto iter = listOctetString.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter, 0)); + VerifyOrReturn( + CheckValueAsString("listOctetString[0]", iter.GetValue(), chip::ByteSpan(chip::Uint8::from_const_char("Test0"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter, 1)); + VerifyOrReturn( + CheckValueAsString("listOctetString[1]", iter.GetValue(), chip::ByteSpan(chip::Uint8::from_const_char("Test1"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter, 2)); + VerifyOrReturn( + CheckValueAsString("listOctetString[2]", iter.GetValue(), chip::ByteSpan(chip::Uint8::from_const_char("Test2"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter, 3)); + VerifyOrReturn( + CheckValueAsString("listOctetString[3]", iter.GetValue(), chip::ByteSpan(chip::Uint8::from_const_char("Test3"), 5))); + VerifyOrReturn(CheckNoMoreListItems("listOctetString", iter, 4)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_168() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::List + listStructOctetStringArgument; + + chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type listStructOctetStringList[4]; + + listStructOctetStringList[0].fabricIndex = 0ULL; + listStructOctetStringList[0].operationalCert = + chip::ByteSpan(chip::Uint8::from_const_char("Test0garbage: not in length on purpose"), 5); + + listStructOctetStringList[1].fabricIndex = 1ULL; + listStructOctetStringList[1].operationalCert = + chip::ByteSpan(chip::Uint8::from_const_char("Test1garbage: not in length on purpose"), 5); + + listStructOctetStringList[2].fabricIndex = 2ULL; + listStructOctetStringList[2].operationalCert = + chip::ByteSpan(chip::Uint8::from_const_char("Test2garbage: not in length on purpose"), 5); + + listStructOctetStringList[3].fabricIndex = 3ULL; + listStructOctetStringList[3].operationalCert = + chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5); + + listStructOctetStringArgument = listStructOctetStringList; + + ReturnErrorOnFailure(cluster.WriteAttribute( + listStructOctetStringArgument, this, OnSuccessCallback_168, OnFailureCallback_168)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_168(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_168() { NextTest(); } + + CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_169() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_169, OnFailureCallback_169)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_169(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_169( + const chip::app::DataModel::DecodableList & + listStructOctetString) + { + auto iter = listStructOctetString.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter, 0)); + VerifyOrReturn(CheckValue("listStructOctetString[0].fabricIndex", iter.GetValue().fabricIndex, 0ULL)); + VerifyOrReturn(CheckValueAsString("listStructOctetString[0].operationalCert", iter.GetValue().operationalCert, + chip::ByteSpan(chip::Uint8::from_const_char("Test0"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter, 1)); + VerifyOrReturn(CheckValue("listStructOctetString[1].fabricIndex", iter.GetValue().fabricIndex, 1ULL)); + VerifyOrReturn(CheckValueAsString("listStructOctetString[1].operationalCert", iter.GetValue().operationalCert, + chip::ByteSpan(chip::Uint8::from_const_char("Test1"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter, 2)); + VerifyOrReturn(CheckValue("listStructOctetString[2].fabricIndex", iter.GetValue().fabricIndex, 2ULL)); + VerifyOrReturn(CheckValueAsString("listStructOctetString[2].operationalCert", iter.GetValue().operationalCert, + chip::ByteSpan(chip::Uint8::from_const_char("Test2"), 5))); + VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter, 3)); + VerifyOrReturn(CheckValue("listStructOctetString[3].fabricIndex", iter.GetValue().fabricIndex, 3ULL)); + VerifyOrReturn(CheckValueAsString("listStructOctetString[3].operationalCert", iter.GetValue().operationalCert, + chip::ByteSpan(chip::Uint8::from_const_char("Test3"), 5))); + VerifyOrReturn(CheckNoMoreListItems("listStructOctetString", iter, 4)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithOptionalArgSet_170() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; + + RequestType request; + request.arg1.Emplace().SetNonNull() = 5; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context)) + ->OnSuccessResponse_170(data.wasPresent, data.wasNull, data.value, data.originalValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_170(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_170(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_170(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + const chip::Optional> & originalValue) + { + VerifyOrReturn(CheckValue("wasPresent", wasPresent, true)); + + VerifyOrReturn(CheckValuePresent("wasNull", wasNull)); + VerifyOrReturn(CheckValue("wasNull.Value()", wasNull.Value(), false)); + + VerifyOrReturn(CheckValuePresent("value", value)); + VerifyOrReturn(CheckValue("value.Value()", value.Value(), 5)); + + VerifyOrReturn(CheckValuePresent("originalValue", originalValue)); + VerifyOrReturn(CheckValueNonNull("originalValue.Value()", originalValue.Value())); + VerifyOrReturn(CheckValue("originalValue.Value().Value()", originalValue.Value().Value(), 5)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_171() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; + + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context)) + ->OnSuccessResponse_171(data.wasPresent, data.wasNull, data.value, data.originalValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_171(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_171(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_171(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + const chip::Optional> & originalValue) + { + VerifyOrReturn(CheckValue("wasPresent", wasPresent, false)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBooleanNull_172() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBooleanArgument; + nullableBooleanArgument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBooleanArgument, this, OnSuccessCallback_172, OnFailureCallback_172)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_172(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_172() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBooleanNull_173() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_173, OnFailureCallback_173)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_173(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_173(const chip::app::DataModel::Nullable & nullableBoolean) + { + VerifyOrReturn(CheckValueNull("nullableBoolean", nullableBoolean)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBooleanTrue_174() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBooleanArgument; + nullableBooleanArgument.SetNonNull() = true; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBooleanArgument, this, OnSuccessCallback_174, OnFailureCallback_174)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_174(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_174() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBooleanTrue_175() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_175, OnFailureCallback_175)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_175(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_175(const chip::app::DataModel::Nullable & nullableBoolean) + { + VerifyOrReturn(CheckValueNonNull("nullableBoolean", nullableBoolean)); + VerifyOrReturn(CheckValue("nullableBoolean.Value()", nullableBoolean.Value(), true)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_176() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap8Argument; + nullableBitmap8Argument.SetNonNull() = 254; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap8Argument, this, OnSuccessCallback_176, OnFailureCallback_176)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_176(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_176() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_177() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_177, OnFailureCallback_177)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_177(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_177(const chip::app::DataModel::Nullable & nullableBitmap8) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); + VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_178() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap8Argument; + nullableBitmap8Argument.SetNonNull() = 255; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap8Argument, this, OnSuccessCallback_178, OnFailureCallback_178)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_178(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_178() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_179() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_179, OnFailureCallback_179)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_179(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_179(const chip::app::DataModel::Nullable & nullableBitmap8) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); + VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_180() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap8Argument; + nullableBitmap8Argument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap8Argument, this, OnSuccessCallback_180, OnFailureCallback_180)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_180(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_180() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_181() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_181, OnFailureCallback_181)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_181(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_181(const chip::app::DataModel::Nullable & nullableBitmap8) + { + VerifyOrReturn(CheckValueNull("nullableBitmap8", nullableBitmap8)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_182() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap16Argument; + nullableBitmap16Argument.SetNonNull() = 65534U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap16Argument, this, OnSuccessCallback_182, OnFailureCallback_182)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_182(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_182() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_183() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_183, OnFailureCallback_183)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_183(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_183(const chip::app::DataModel::Nullable & nullableBitmap16) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); + VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_184() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap16Argument; + nullableBitmap16Argument.SetNonNull() = 65535U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap16Argument, this, OnSuccessCallback_184, OnFailureCallback_184)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_184(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_184() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_185() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_185, OnFailureCallback_185)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_185(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_185(const chip::app::DataModel::Nullable & nullableBitmap16) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); + VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_186() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap16Argument; + nullableBitmap16Argument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap16Argument, this, OnSuccessCallback_186, OnFailureCallback_186)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_186(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_186() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_187() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_187, OnFailureCallback_187)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_187(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_187(const chip::app::DataModel::Nullable & nullableBitmap16) + { + VerifyOrReturn(CheckValueNull("nullableBitmap16", nullableBitmap16)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_188() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap32Argument; + nullableBitmap32Argument.SetNonNull() = 4294967294UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap32Argument, this, OnSuccessCallback_188, OnFailureCallback_188)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_188(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_188() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_189() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_189, OnFailureCallback_189)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_189(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_189(const chip::app::DataModel::Nullable & nullableBitmap32) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); + VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_190() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap32Argument; + nullableBitmap32Argument.SetNonNull() = 4294967295UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap32Argument, this, OnSuccessCallback_190, OnFailureCallback_190)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_190(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_190() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_191() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_191, OnFailureCallback_191)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_191(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_191(const chip::app::DataModel::Nullable & nullableBitmap32) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); + VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_192() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap32Argument; + nullableBitmap32Argument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap32Argument, this, OnSuccessCallback_192, OnFailureCallback_192)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_192(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_192() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_193() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_193, OnFailureCallback_193)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_193(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_193(const chip::app::DataModel::Nullable & nullableBitmap32) + { + VerifyOrReturn(CheckValueNull("nullableBitmap32", nullableBitmap32)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_194() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap64Argument; + nullableBitmap64Argument.SetNonNull() = 18446744073709551614ULL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap64Argument, this, OnSuccessCallback_194, OnFailureCallback_194)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_194(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_194() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_195() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_195, OnFailureCallback_195)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_195(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_195(const chip::app::DataModel::Nullable & nullableBitmap64) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); + VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_196() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap64Argument; + nullableBitmap64Argument.SetNonNull() = 18446744073709551615ULL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap64Argument, this, OnSuccessCallback_196, OnFailureCallback_196)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_196(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_196() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_197() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_197, OnFailureCallback_197)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_197(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_197(const chip::app::DataModel::Nullable & nullableBitmap64) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); + VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_198() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableBitmap64Argument; + nullableBitmap64Argument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableBitmap64Argument, this, OnSuccessCallback_198, OnFailureCallback_198)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_198(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_198() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_199() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_199, OnFailureCallback_199)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_199(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_199(const chip::app::DataModel::Nullable & nullableBitmap64) + { + VerifyOrReturn(CheckValueNull("nullableBitmap64", nullableBitmap64)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_200() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt8uArgument; + nullableInt8uArgument.SetNonNull() = 254; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8uArgument, this, OnSuccessCallback_200, OnFailureCallback_200)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_200(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_200() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_201() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_201, OnFailureCallback_201)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_201(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_201(const chip::app::DataModel::Nullable & nullableInt8u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); + VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_202() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt8uArgument; + nullableInt8uArgument.SetNonNull() = 255; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8uArgument, this, OnSuccessCallback_202, OnFailureCallback_202)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_202(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_202() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_203() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_203, OnFailureCallback_203)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_203(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_203(const chip::app::DataModel::Nullable & nullableInt8u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); + VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_204() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt8uArgument; + nullableInt8uArgument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8uArgument, this, OnSuccessCallback_204, OnFailureCallback_204)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_204(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_204() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt8uNullValue_205() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_205, OnFailureCallback_205)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_205(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_205(const chip::app::DataModel::Nullable & nullableInt8u) + { + VerifyOrReturn(CheckValueNull("nullableInt8u", nullableInt8u)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_206() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt16uArgument; + nullableInt16uArgument.SetNonNull() = 65534U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16uArgument, this, OnSuccessCallback_206, OnFailureCallback_206)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_206(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_206() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_207() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_207, OnFailureCallback_207)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_207(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_207(const chip::app::DataModel::Nullable & nullableInt16u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); + VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_208() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt16uArgument; + nullableInt16uArgument.SetNonNull() = 65535U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16uArgument, this, OnSuccessCallback_208, OnFailureCallback_208)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_208(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_208() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_209() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_209, OnFailureCallback_209)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_209(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_209(const chip::app::DataModel::Nullable & nullableInt16u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); + VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_210() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt16uArgument; + nullableInt16uArgument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16uArgument, this, OnSuccessCallback_210, OnFailureCallback_210)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_210(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_210() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt16uNullValue_211() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_211, OnFailureCallback_211)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_211(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_211(const chip::app::DataModel::Nullable & nullableInt16u) + { + VerifyOrReturn(CheckValueNull("nullableInt16u", nullableInt16u)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_212() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt32uArgument; + nullableInt32uArgument.SetNonNull() = 4294967294UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32uArgument, this, OnSuccessCallback_212, OnFailureCallback_212)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_212(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_212() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_213() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_213, OnFailureCallback_213)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_213(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_213(const chip::app::DataModel::Nullable & nullableInt32u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); + VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_214() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt32uArgument; + nullableInt32uArgument.SetNonNull() = 4294967295UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32uArgument, this, OnSuccessCallback_214, OnFailureCallback_214)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_214(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_214() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_215() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_215, OnFailureCallback_215)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_215(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_215(const chip::app::DataModel::Nullable & nullableInt32u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); + VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_216() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt32uArgument; + nullableInt32uArgument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32uArgument, this, OnSuccessCallback_216, OnFailureCallback_216)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_216(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_216() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt32uNullValue_217() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_217, OnFailureCallback_217)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_217(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_217(const chip::app::DataModel::Nullable & nullableInt32u) + { + VerifyOrReturn(CheckValueNull("nullableInt32u", nullableInt32u)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_218() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt64uArgument; + nullableInt64uArgument.SetNonNull() = 18446744073709551614ULL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64uArgument, this, OnSuccessCallback_218, OnFailureCallback_218)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_218(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_218() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_219() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_219, OnFailureCallback_219)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_219(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_219(const chip::app::DataModel::Nullable & nullableInt64u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); + VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_220() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt64uArgument; + nullableInt64uArgument.SetNonNull() = 18446744073709551615ULL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64uArgument, this, OnSuccessCallback_220, OnFailureCallback_220)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_220(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_220() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_221() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_221, OnFailureCallback_221)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_221(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_221(const chip::app::DataModel::Nullable & nullableInt64u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); + VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_222() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt64uArgument; + nullableInt64uArgument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64uArgument, this, OnSuccessCallback_222, OnFailureCallback_222)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_222(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_222() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt64uNullValue_223() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_223, OnFailureCallback_223)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_223(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_223(const chip::app::DataModel::Nullable & nullableInt64u) + { + VerifyOrReturn(CheckValueNull("nullableInt64u", nullableInt64u)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_224() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt8sArgument; + nullableInt8sArgument.SetNonNull() = -127; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8sArgument, this, OnSuccessCallback_224, OnFailureCallback_224)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_224(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_224() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt8sMinValue_225() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_225, OnFailureCallback_225)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_225(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_225(const chip::app::DataModel::Nullable & nullableInt8s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); + VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_226() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt8sArgument; + nullableInt8sArgument.SetNonNull() = -128; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8sArgument, this, OnSuccessCallback_226, OnFailureCallback_226)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_226(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_226() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_227() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_227, OnFailureCallback_227)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_227(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_227(const chip::app::DataModel::Nullable & nullableInt8s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); + VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_228() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt8sArgument; + nullableInt8sArgument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt8sArgument, this, OnSuccessCallback_228, OnFailureCallback_228)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_228(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_228() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt8sNullValue_229() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_229, OnFailureCallback_229)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_229(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_229(const chip::app::DataModel::Nullable & nullableInt8s) + { + VerifyOrReturn(CheckValueNull("nullableInt8s", nullableInt8s)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_230() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt16sArgument; + nullableInt16sArgument.SetNonNull() = -32767; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16sArgument, this, OnSuccessCallback_230, OnFailureCallback_230)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_230(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_230() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt16sMinValue_231() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_231, OnFailureCallback_231)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_231(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_231(const chip::app::DataModel::Nullable & nullableInt16s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); + VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_232() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt16sArgument; + nullableInt16sArgument.SetNonNull() = -32768; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16sArgument, this, OnSuccessCallback_232, OnFailureCallback_232)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_232(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_232() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_233() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_233, OnFailureCallback_233)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_233(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_233(const chip::app::DataModel::Nullable & nullableInt16s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); + VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_234() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt16sArgument; + nullableInt16sArgument.SetNull(); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt16sArgument, this, OnSuccessCallback_234, OnFailureCallback_234)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_234(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_234() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt16sNullValue_235() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_235, OnFailureCallback_235)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_235(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_235(const chip::app::DataModel::Nullable & nullableInt16s) + { + VerifyOrReturn(CheckValueNull("nullableInt16s", nullableInt16s)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_236() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt32sArgument; + nullableInt32sArgument.SetNonNull() = -2147483647L; - dList[0].a = 1; - dList[0].b = true; - dList[0].c = static_cast(3); - dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList[0].f = static_cast>(1); - dList[0].g = 0.0f; - dList[0].h = 0; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32sArgument, this, OnSuccessCallback_236, OnFailureCallback_236)); + return CHIP_NO_ERROR; + } - dList[1].a = 2; - dList[1].b = true; - dList[1].c = static_cast(3); - dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList[1].f = static_cast>(1); - dList[1].g = 0.0f; - dList[1].h = 0; + void OnFailureResponse_236(EmberAfStatus status) { ThrowFailureResponse(); } - request.arg1.d = dList; + void OnSuccessResponse_236() { NextTest(); } - uint32_t eList[3]; - eList[0] = 1UL; - eList[1] = 2UL; - eList[2] = 3UL; - request.arg1.e = eList; + CHIP_ERROR TestReadAttributeNullableInt32sMinValue_237() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::ByteSpan fList[3]; - fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - request.arg1.f = fList; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_237, OnFailureCallback_237)); + return CHIP_NO_ERROR; + } - uint8_t gList[2]; - gList[0] = 0; - gList[1] = 255; - request.arg1.g = gList; + void OnFailureResponse_237(EmberAfStatus status) { ThrowFailureResponse(); } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_153(data.value); - }; + void OnSuccessResponse_237(const chip::app::DataModel::Nullable & nullableInt32s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); + VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_153(status); - }; + NextTest(); + } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_238() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableInt32sArgument; + nullableInt32sArgument.SetNonNull() = -2147483648L; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32sArgument, this, OnSuccessCallback_238, OnFailureCallback_238)); return CHIP_NO_ERROR; } - void OnFailureResponse_153(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_238(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_153(bool value) + void OnSuccessResponse_238() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_239() { - VerifyOrReturn(CheckValue("value", value, true)); + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_239, OnFailureCallback_239)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_239(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_239(const chip::app::DataModel::Nullable & nullableInt32s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); + VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfArg1dAreFalse_154() + CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_240() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::app::DataModel::Nullable nullableInt32sArgument; + nullableInt32sArgument.SetNull(); - request.arg1.a = 0; - request.arg1.b = true; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt32sArgument, this, OnSuccessCallback_240, OnFailureCallback_240)); + return CHIP_NO_ERROR; + } - request.arg1.c.a = 0; - request.arg1.c.b = true; - request.arg1.c.c = static_cast(2); - request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.c.f = static_cast>(1); - request.arg1.c.g = 0.0f; - request.arg1.c.h = 0; + void OnFailureResponse_240(EmberAfStatus status) { ThrowFailureResponse(); } - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; + void OnSuccessResponse_240() { NextTest(); } - dList[0].a = 1; - dList[0].b = true; - dList[0].c = static_cast(3); - dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList[0].f = static_cast>(1); - dList[0].g = 0.0f; - dList[0].h = 0; + CHIP_ERROR TestReadAttributeNullableInt32sNullValue_241() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - dList[1].a = 2; - dList[1].b = false; - dList[1].c = static_cast(3); - dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList[1].f = static_cast>(1); - dList[1].g = 0.0f; - dList[1].h = 0; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_241, OnFailureCallback_241)); + return CHIP_NO_ERROR; + } - request.arg1.d = dList; + void OnFailureResponse_241(EmberAfStatus status) { ThrowFailureResponse(); } - uint32_t eList[3]; - eList[0] = 1UL; - eList[1] = 2UL; - eList[2] = 3UL; - request.arg1.e = eList; + void OnSuccessResponse_241(const chip::app::DataModel::Nullable & nullableInt32s) + { + VerifyOrReturn(CheckValueNull("nullableInt32s", nullableInt32s)); - chip::ByteSpan fList[3]; - fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - request.arg1.f = fList; + NextTest(); + } - uint8_t gList[2]; - gList[0] = 0; - gList[1] = 255; - request.arg1.g = gList; + CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_242() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_154(data.value); - }; + chip::app::DataModel::Nullable nullableInt64sArgument; + nullableInt64sArgument.SetNonNull() = -9223372036854775807LL; - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_154(status); - }; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64sArgument, this, OnSuccessCallback_242, OnFailureCallback_242)); + return CHIP_NO_ERROR; + } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + void OnFailureResponse_242(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_242() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt64sMinValue_243() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_243, OnFailureCallback_243)); return CHIP_NO_ERROR; } - void OnFailureResponse_154(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_243(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_154(bool value) + void OnSuccessResponse_243(const chip::app::DataModel::Nullable & nullableInt64s) { - VerifyOrReturn(CheckValue("value", value, false)); + VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); + VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_155() + CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_244() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::app::DataModel::Nullable nullableInt64sArgument; + nullableInt64sArgument.SetNonNull() = -9223372036854775807LL - 1; - request.arg1.a = 17; - request.arg1.b = false; - request.arg1.c = static_cast(2); - request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.f = static_cast>(1); - request.arg1.g = 0.1f; - request.arg1.h = 0.1; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64sArgument, this, OnSuccessCallback_244, OnFailureCallback_244)); + return CHIP_NO_ERROR; + } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_155(data.arg1); - }; + void OnFailureResponse_244(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_155(status); - }; + void OnSuccessResponse_244() { ThrowSuccessResponse(); } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_245() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_245, OnFailureCallback_245)); return CHIP_NO_ERROR; } - void OnFailureResponse_155(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_245(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_155(const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & arg1) + void OnSuccessResponse_245(const chip::app::DataModel::Nullable & nullableInt64s) { - VerifyOrReturn(CheckValue("arg1.a", arg1.a, 17)); - VerifyOrReturn(CheckValue("arg1.b", arg1.b, false)); - VerifyOrReturn(CheckValue("arg1.c", arg1.c, 2)); - VerifyOrReturn(CheckValueAsString("arg1.d", arg1.d, chip::ByteSpan(chip::Uint8::from_const_char("octet_string"), 12))); - VerifyOrReturn(CheckValueAsString("arg1.e", arg1.e, chip::CharSpan("char_string", 11))); - VerifyOrReturn(CheckValue("arg1.f", arg1.f, 1)); - VerifyOrReturn(CheckValue("arg1.g", arg1.g, 0.1f)); - VerifyOrReturn(CheckValue("arg1.h", arg1.h, 0.1)); + VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); + VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_156() + CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_246() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::app::DataModel::Nullable nullableInt64sArgument; + nullableInt64sArgument.SetNull(); - uint8_t arg1List[9]; - arg1List[0] = 1; - arg1List[1] = 2; - arg1List[2] = 3; - arg1List[3] = 4; - arg1List[4] = 5; - arg1List[5] = 6; - arg1List[6] = 7; - arg1List[7] = 8; - arg1List[8] = 9; - request.arg1 = arg1List; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableInt64sArgument, this, OnSuccessCallback_246, OnFailureCallback_246)); + return CHIP_NO_ERROR; + } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_156(data.value); - }; + void OnFailureResponse_246(EmberAfStatus status) { ThrowFailureResponse(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_156(status); - }; + void OnSuccessResponse_246() { NextTest(); } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + CHIP_ERROR TestReadAttributeNullableInt64sNullValue_247() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_247, OnFailureCallback_247)); return CHIP_NO_ERROR; } - void OnFailureResponse_156(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_247(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_156(bool value) + void OnSuccessResponse_247(const chip::app::DataModel::Nullable & nullableInt64s) { - VerifyOrReturn(CheckValue("value", value, true)); + VerifyOrReturn(CheckValueNull("nullableInt64s", nullableInt64s)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_157() + CHIP_ERROR TestWriteAttributeNullableSingleMediumValue_248() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::app::DataModel::Nullable nullableFloatSingleArgument; + nullableFloatSingleArgument.SetNonNull() = 0.1f; - uint8_t arg1List[10]; - arg1List[0] = 1; - arg1List[1] = 2; - arg1List[2] = 3; - arg1List[3] = 4; - arg1List[4] = 5; - arg1List[5] = 6; - arg1List[6] = 7; - arg1List[7] = 8; - arg1List[8] = 9; - arg1List[9] = 0; - request.arg1 = arg1List; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatSingleArgument, this, OnSuccessCallback_248, OnFailureCallback_248)); + return CHIP_NO_ERROR; + } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_157(data.value); - }; + void OnFailureResponse_248(EmberAfStatus status) { ThrowFailureResponse(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_157(status); - }; + void OnSuccessResponse_248() { NextTest(); } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + CHIP_ERROR TestReadAttributeNullableSingleMediumValue_249() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_249, OnFailureCallback_249)); return CHIP_NO_ERROR; } - void OnFailureResponse_157(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_249(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_157(bool value) + void OnSuccessResponse_249(const chip::app::DataModel::Nullable & nullableFloatSingle) { - VerifyOrReturn(CheckValue("value", value, false)); + VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); + VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), 0.1f)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_158() + CHIP_ERROR TestWriteAttributeNullableSingleLargestValue_250() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::app::DataModel::Nullable nullableFloatSingleArgument; + nullableFloatSingleArgument.SetNonNull() = INFINITY; - uint8_t arg1List[9]; - arg1List[0] = 1; - arg1List[1] = 2; - arg1List[2] = 3; - arg1List[3] = 4; - arg1List[4] = 5; - arg1List[5] = 6; - arg1List[6] = 7; - arg1List[7] = 8; - arg1List[8] = 9; - request.arg1 = arg1List; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatSingleArgument, this, OnSuccessCallback_250, OnFailureCallback_250)); + return CHIP_NO_ERROR; + } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_158(data.arg1); - }; + void OnFailureResponse_250(EmberAfStatus status) { ThrowFailureResponse(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_158(status); - }; + void OnSuccessResponse_250() { NextTest(); } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + CHIP_ERROR TestReadAttributeNullableSingleLargestValue_251() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_251, OnFailureCallback_251)); return CHIP_NO_ERROR; } - void OnFailureResponse_158(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_251(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_158(const chip::app::DataModel::DecodableList & arg1) + void OnSuccessResponse_251(const chip::app::DataModel::Nullable & nullableFloatSingle) { - auto iter = arg1.begin(); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 0)); - VerifyOrReturn(CheckValue("arg1[0]", iter.GetValue(), 9)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 1)); - VerifyOrReturn(CheckValue("arg1[1]", iter.GetValue(), 8)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 2)); - VerifyOrReturn(CheckValue("arg1[2]", iter.GetValue(), 7)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 3)); - VerifyOrReturn(CheckValue("arg1[3]", iter.GetValue(), 6)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 4)); - VerifyOrReturn(CheckValue("arg1[4]", iter.GetValue(), 5)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 5)); - VerifyOrReturn(CheckValue("arg1[5]", iter.GetValue(), 4)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 6)); - VerifyOrReturn(CheckValue("arg1[6]", iter.GetValue(), 3)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 7)); - VerifyOrReturn(CheckValue("arg1[7]", iter.GetValue(), 2)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 8)); - VerifyOrReturn(CheckValue("arg1[8]", iter.GetValue(), 1)); - VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 9)); + VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); + VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), INFINITY)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_159() + CHIP_ERROR TestWriteAttributeNullableSingleSmallestValue_252() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::app::DataModel::Nullable nullableFloatSingleArgument; + nullableFloatSingleArgument.SetNonNull() = -INFINITY; - request.arg1 = chip::app::DataModel::List(); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatSingleArgument, this, OnSuccessCallback_252, OnFailureCallback_252)); + return CHIP_NO_ERROR; + } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_159(data.arg1); - }; + void OnFailureResponse_252(EmberAfStatus status) { ThrowFailureResponse(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_159(status); - }; + void OnSuccessResponse_252() { NextTest(); } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + CHIP_ERROR TestReadAttributeNullableSingleSmallestValue_253() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_253, OnFailureCallback_253)); return CHIP_NO_ERROR; } - void OnFailureResponse_159(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_253(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_159(const chip::app::DataModel::DecodableList & arg1) + void OnSuccessResponse_253(const chip::app::DataModel::Nullable & nullableFloatSingle) { - auto iter = arg1.begin(); - VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 0)); + VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); + VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), -INFINITY)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_160() + CHIP_ERROR TestWriteAttributeNullableSingleNullValue_254() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; - - RequestType request; - - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List[2]; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - arg1List[0].a = 0; - arg1List[0].b = true; - arg1List[0].c = static_cast(2); - arg1List[0].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); - arg1List[0].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); - arg1List[0].f = static_cast>(1); - arg1List[0].g = 0.0f; - arg1List[0].h = 0; + chip::app::DataModel::Nullable nullableFloatSingleArgument; + nullableFloatSingleArgument.SetNull(); - arg1List[1].a = 1; - arg1List[1].b = true; - arg1List[1].c = static_cast(3); - arg1List[1].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); - arg1List[1].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); - arg1List[1].f = static_cast>(1); - arg1List[1].g = 0.0f; - arg1List[1].h = 0; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatSingleArgument, this, OnSuccessCallback_254, OnFailureCallback_254)); + return CHIP_NO_ERROR; + } - request.arg1 = arg1List; + void OnFailureResponse_254(EmberAfStatus status) { ThrowFailureResponse(); } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_160(data.value); - }; + void OnSuccessResponse_254() { NextTest(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_160(status); - }; + CHIP_ERROR TestReadAttributeNullableSingleNullValue_255() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_255, OnFailureCallback_255)); return CHIP_NO_ERROR; } - void OnFailureResponse_160(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_255(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_160(bool value) + void OnSuccessResponse_255(const chip::app::DataModel::Nullable & nullableFloatSingle) { - VerifyOrReturn(CheckValue("value", value, true)); + VerifyOrReturn(CheckValueNull("nullableFloatSingle", nullableFloatSingle)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_161() + CHIP_ERROR TestWriteAttributeNullableSingle0Value_256() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; - - RequestType request; - - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List[2]; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - arg1List[0].a = 1; - arg1List[0].b = true; - arg1List[0].c = static_cast(3); - arg1List[0].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); - arg1List[0].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); - arg1List[0].f = static_cast>(1); - arg1List[0].g = 0.0f; - arg1List[0].h = 0; + chip::app::DataModel::Nullable nullableFloatSingleArgument; + nullableFloatSingleArgument.SetNonNull() = 0.0f; - arg1List[1].a = 0; - arg1List[1].b = false; - arg1List[1].c = static_cast(2); - arg1List[1].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); - arg1List[1].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); - arg1List[1].f = static_cast>(1); - arg1List[1].g = 0.0f; - arg1List[1].h = 0; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatSingleArgument, this, OnSuccessCallback_256, OnFailureCallback_256)); + return CHIP_NO_ERROR; + } - request.arg1 = arg1List; + void OnFailureResponse_256(EmberAfStatus status) { ThrowFailureResponse(); } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_161(data.value); - }; + void OnSuccessResponse_256() { NextTest(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_161(status); - }; + CHIP_ERROR TestReadAttributeNullableSingle0Value_257() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_257, OnFailureCallback_257)); return CHIP_NO_ERROR; } - void OnFailureResponse_161(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_257(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_161(bool value) + void OnSuccessResponse_257(const chip::app::DataModel::Nullable & nullableFloatSingle) { - VerifyOrReturn(CheckValue("value", value, false)); + VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); + VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), 0.0f)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_162() + CHIP_ERROR TestWriteAttributeNullableDoubleMediumValue_258() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; - - RequestType request; - - chip::app::Clusters::TestCluster::Structs::NestedStructList::Type arg1List[1]; - - arg1List[0].a = 0; - arg1List[0].b = true; - - arg1List[0].c.a = 0; - arg1List[0].c.b = true; - arg1List[0].c.c = static_cast(2); - arg1List[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - arg1List[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - arg1List[0].c.f = static_cast>(1); - arg1List[0].c.g = 0.0f; - arg1List[0].c.h = 0; - - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; - - dList[0].a = 1; - dList[0].b = true; - dList[0].c = static_cast(3); - dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList[0].f = static_cast>(1); - dList[0].g = 0.0f; - dList[0].h = 0; - - dList[1].a = 2; - dList[1].b = true; - dList[1].c = static_cast(3); - dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList[1].f = static_cast>(1); - dList[1].g = 0.0f; - dList[1].h = 0; - - arg1List[0].d = dList; - - uint32_t eList[3]; - eList[0] = 1UL; - eList[1] = 2UL; - eList[2] = 3UL; - arg1List[0].e = eList; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::ByteSpan fList[3]; - fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - arg1List[0].f = fList; + chip::app::DataModel::Nullable nullableFloatDoubleArgument; + nullableFloatDoubleArgument.SetNonNull() = 0.1234567890123; - uint8_t gList[2]; - gList[0] = 0; - gList[1] = 255; - arg1List[0].g = gList; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatDoubleArgument, this, OnSuccessCallback_258, OnFailureCallback_258)); + return CHIP_NO_ERROR; + } - request.arg1 = arg1List; + void OnFailureResponse_258(EmberAfStatus status) { ThrowFailureResponse(); } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_162(data.value); - }; + void OnSuccessResponse_258() { NextTest(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_162(status); - }; + CHIP_ERROR TestReadAttributeNullableDoubleMediumValue_259() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_259, OnFailureCallback_259)); return CHIP_NO_ERROR; } - void OnFailureResponse_162(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_259(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_162(bool value) + void OnSuccessResponse_259(const chip::app::DataModel::Nullable & nullableFloatDouble) { - VerifyOrReturn(CheckValue("value", value, true)); + VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); + VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), 0.1234567890123)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_163() + CHIP_ERROR TestWriteAttributeNullableDoubleLargestValue_260() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::app::DataModel::Nullable nullableFloatDoubleArgument; + nullableFloatDoubleArgument.SetNonNull() = INFINITY; - chip::app::Clusters::TestCluster::Structs::NestedStructList::Type arg1List[1]; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatDoubleArgument, this, OnSuccessCallback_260, OnFailureCallback_260)); + return CHIP_NO_ERROR; + } - arg1List[0].a = 0; - arg1List[0].b = true; + void OnFailureResponse_260(EmberAfStatus status) { ThrowFailureResponse(); } - arg1List[0].c.a = 0; - arg1List[0].c.b = true; - arg1List[0].c.c = static_cast(2); - arg1List[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - arg1List[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - arg1List[0].c.f = static_cast>(1); - arg1List[0].c.g = 0.0f; - arg1List[0].c.h = 0; + void OnSuccessResponse_260() { NextTest(); } - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; + CHIP_ERROR TestReadAttributeNullableDoubleLargestValue_261() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - dList[0].a = 1; - dList[0].b = true; - dList[0].c = static_cast(3); - dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList[0].f = static_cast>(1); - dList[0].g = 0.0f; - dList[0].h = 0; + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_261, OnFailureCallback_261)); + return CHIP_NO_ERROR; + } - dList[1].a = 2; - dList[1].b = false; - dList[1].c = static_cast(3); - dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - dList[1].f = static_cast>(1); - dList[1].g = 0.0f; - dList[1].h = 0; + void OnFailureResponse_261(EmberAfStatus status) { ThrowFailureResponse(); } - arg1List[0].d = dList; + void OnSuccessResponse_261(const chip::app::DataModel::Nullable & nullableFloatDouble) + { + VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); + VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), INFINITY)); - uint32_t eList[3]; - eList[0] = 1UL; - eList[1] = 2UL; - eList[2] = 3UL; - arg1List[0].e = eList; + NextTest(); + } - chip::ByteSpan fList[3]; - fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - arg1List[0].f = fList; + CHIP_ERROR TestWriteAttributeNullableDoubleSmallestValue_262() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t gList[2]; - gList[0] = 0; - gList[1] = 255; - arg1List[0].g = gList; + chip::app::DataModel::Nullable nullableFloatDoubleArgument; + nullableFloatDoubleArgument.SetNonNull() = -INFINITY; - request.arg1 = arg1List; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatDoubleArgument, this, OnSuccessCallback_262, OnFailureCallback_262)); + return CHIP_NO_ERROR; + } - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_163(data.value); - }; + void OnFailureResponse_262(EmberAfStatus status) { ThrowFailureResponse(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_163(status); - }; + void OnSuccessResponse_262() { NextTest(); } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + CHIP_ERROR TestReadAttributeNullableDoubleSmallestValue_263() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_263, OnFailureCallback_263)); return CHIP_NO_ERROR; } - void OnFailureResponse_163(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_263(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_163(bool value) + void OnSuccessResponse_263(const chip::app::DataModel::Nullable & nullableFloatDouble) { - VerifyOrReturn(CheckValue("value", value, false)); + VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); + VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), -INFINITY)); NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_164() + CHIP_ERROR TestWriteAttributeNullableDoubleNullValue_264() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::List listInt8uArgument; - - uint8_t listInt8uList[4]; - listInt8uList[0] = 1; - listInt8uList[1] = 2; - listInt8uList[2] = 3; - listInt8uList[3] = 4; - listInt8uArgument = listInt8uList; + chip::app::DataModel::Nullable nullableFloatDoubleArgument; + nullableFloatDoubleArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute( - listInt8uArgument, this, OnSuccessCallback_164, OnFailureCallback_164)); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatDoubleArgument, this, OnSuccessCallback_264, OnFailureCallback_264)); return CHIP_NO_ERROR; } - void OnFailureResponse_164(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_264(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_164() { NextTest(); } + void OnSuccessResponse_264() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfInt8u_165() + CHIP_ERROR TestReadAttributeNullableDoubleNullValue_265() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_165, OnFailureCallback_165)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_265, OnFailureCallback_265)); return CHIP_NO_ERROR; } - void OnFailureResponse_165(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_265(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_165(const chip::app::DataModel::DecodableList & listInt8u) + void OnSuccessResponse_265(const chip::app::DataModel::Nullable & nullableFloatDouble) { - auto iter = listInt8u.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter.GetValue(), 1)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter.GetValue(), 2)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter.GetValue(), 3)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter.GetValue(), 4)); - VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter, 4)); + VerifyOrReturn(CheckValueNull("nullableFloatDouble", nullableFloatDouble)); NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfOctetString_166() + CHIP_ERROR TestWriteAttributeNullableDouble0Value_266() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::List listOctetStringArgument; - - chip::ByteSpan listOctetStringList[4]; - listOctetStringList[0] = chip::ByteSpan(chip::Uint8::from_const_char("Test0garbage: not in length on purpose"), 5); - listOctetStringList[1] = chip::ByteSpan(chip::Uint8::from_const_char("Test1garbage: not in length on purpose"), 5); - listOctetStringList[2] = chip::ByteSpan(chip::Uint8::from_const_char("Test2garbage: not in length on purpose"), 5); - listOctetStringList[3] = chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5); - listOctetStringArgument = listOctetStringList; + chip::app::DataModel::Nullable nullableFloatDoubleArgument; + nullableFloatDoubleArgument.SetNonNull() = 0; - ReturnErrorOnFailure(cluster.WriteAttribute( - listOctetStringArgument, this, OnSuccessCallback_166, OnFailureCallback_166)); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableFloatDoubleArgument, this, OnSuccessCallback_266, OnFailureCallback_266)); return CHIP_NO_ERROR; } - void OnFailureResponse_166(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_266(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_166() { NextTest(); } + void OnSuccessResponse_266() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfOctetString_167() + CHIP_ERROR TestReadAttributeNullableDouble0Value_267() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_167, OnFailureCallback_167)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_267, OnFailureCallback_267)); return CHIP_NO_ERROR; } - void OnFailureResponse_167(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_267(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_167(const chip::app::DataModel::DecodableList & listOctetString) + void OnSuccessResponse_267(const chip::app::DataModel::Nullable & nullableFloatDouble) { - auto iter = listOctetString.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter, 0)); - VerifyOrReturn( - CheckValueAsString("listOctetString[0]", iter.GetValue(), chip::ByteSpan(chip::Uint8::from_const_char("Test0"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter, 1)); - VerifyOrReturn( - CheckValueAsString("listOctetString[1]", iter.GetValue(), chip::ByteSpan(chip::Uint8::from_const_char("Test1"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter, 2)); - VerifyOrReturn( - CheckValueAsString("listOctetString[2]", iter.GetValue(), chip::ByteSpan(chip::Uint8::from_const_char("Test2"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter, 3)); - VerifyOrReturn( - CheckValueAsString("listOctetString[3]", iter.GetValue(), chip::ByteSpan(chip::Uint8::from_const_char("Test3"), 5))); - VerifyOrReturn(CheckNoMoreListItems("listOctetString", iter, 4)); + VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); + VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_168() + CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_268() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::List - listStructOctetStringArgument; - - chip::app::Clusters::TestCluster::Structs::TestListStructOctet::Type listStructOctetStringList[4]; - - listStructOctetStringList[0].fabricIndex = 0ULL; - listStructOctetStringList[0].operationalCert = - chip::ByteSpan(chip::Uint8::from_const_char("Test0garbage: not in length on purpose"), 5); - - listStructOctetStringList[1].fabricIndex = 1ULL; - listStructOctetStringList[1].operationalCert = - chip::ByteSpan(chip::Uint8::from_const_char("Test1garbage: not in length on purpose"), 5); - - listStructOctetStringList[2].fabricIndex = 2ULL; - listStructOctetStringList[2].operationalCert = - chip::ByteSpan(chip::Uint8::from_const_char("Test2garbage: not in length on purpose"), 5); - - listStructOctetStringList[3].fabricIndex = 3ULL; - listStructOctetStringList[3].operationalCert = - chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5); - - listStructOctetStringArgument = listStructOctetStringList; + chip::app::DataModel::Nullable nullableEnum8Argument; + nullableEnum8Argument.SetNonNull() = 254; - ReturnErrorOnFailure(cluster.WriteAttribute( - listStructOctetStringArgument, this, OnSuccessCallback_168, OnFailureCallback_168)); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum8Argument, this, OnSuccessCallback_268, OnFailureCallback_268)); return CHIP_NO_ERROR; } - void OnFailureResponse_168(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_268(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_168() { NextTest(); } + void OnSuccessResponse_268() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_169() + CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_269() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_169, OnFailureCallback_169)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_269, OnFailureCallback_269)); return CHIP_NO_ERROR; } - void OnFailureResponse_169(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_269(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_169( - const chip::app::DataModel::DecodableList & - listStructOctetString) + void OnSuccessResponse_269(const chip::app::DataModel::Nullable & nullableEnum8) { - auto iter = listStructOctetString.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter, 0)); - VerifyOrReturn(CheckValue("listStructOctetString[0].fabricIndex", iter.GetValue().fabricIndex, 0ULL)); - VerifyOrReturn(CheckValueAsString("listStructOctetString[0].operationalCert", iter.GetValue().operationalCert, - chip::ByteSpan(chip::Uint8::from_const_char("Test0"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter, 1)); - VerifyOrReturn(CheckValue("listStructOctetString[1].fabricIndex", iter.GetValue().fabricIndex, 1ULL)); - VerifyOrReturn(CheckValueAsString("listStructOctetString[1].operationalCert", iter.GetValue().operationalCert, - chip::ByteSpan(chip::Uint8::from_const_char("Test1"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter, 2)); - VerifyOrReturn(CheckValue("listStructOctetString[2].fabricIndex", iter.GetValue().fabricIndex, 2ULL)); - VerifyOrReturn(CheckValueAsString("listStructOctetString[2].operationalCert", iter.GetValue().operationalCert, - chip::ByteSpan(chip::Uint8::from_const_char("Test2"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter, 3)); - VerifyOrReturn(CheckValue("listStructOctetString[3].fabricIndex", iter.GetValue().fabricIndex, 3ULL)); - VerifyOrReturn(CheckValueAsString("listStructOctetString[3].operationalCert", iter.GetValue().operationalCert, - chip::ByteSpan(chip::Uint8::from_const_char("Test3"), 5))); - VerifyOrReturn(CheckNoMoreListItems("listStructOctetString", iter, 4)); + VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); + VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithOptionalArgSet_170() + CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_270() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; - - RequestType request; - request.arg1.Emplace().SetNonNull() = 5; - - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context)) - ->OnSuccessResponse_170(data.wasPresent, data.wasNull, data.value, data.originalValue); - }; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_170(status); - }; + chip::app::DataModel::Nullable nullableEnum8Argument; + nullableEnum8Argument.SetNonNull() = 255; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum8Argument, this, OnSuccessCallback_270, OnFailureCallback_270)); return CHIP_NO_ERROR; } - void OnFailureResponse_170(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_270(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_170(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, - const chip::Optional> & originalValue) + void OnSuccessResponse_270() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_271() { - VerifyOrReturn(CheckValue("wasPresent", wasPresent, true)); + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - VerifyOrReturn(CheckValuePresent("wasNull", wasNull)); - VerifyOrReturn(CheckValue("wasNull.Value()", wasNull.Value(), false)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_271, OnFailureCallback_271)); + return CHIP_NO_ERROR; + } - VerifyOrReturn(CheckValuePresent("value", value)); - VerifyOrReturn(CheckValue("value.Value()", value.Value(), 5)); + void OnFailureResponse_271(EmberAfStatus status) { ThrowFailureResponse(); } - VerifyOrReturn(CheckValuePresent("originalValue", originalValue)); - VerifyOrReturn(CheckValueNonNull("originalValue.Value()", originalValue.Value())); - VerifyOrReturn(CheckValue("originalValue.Value().Value()", originalValue.Value().Value(), 5)); + void OnSuccessResponse_271(const chip::app::DataModel::Nullable & nullableEnum8) + { + VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); + VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_171() + CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_272() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - RequestType request; + chip::app::DataModel::Nullable nullableEnum8Argument; + nullableEnum8Argument.SetNull(); - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context)) - ->OnSuccessResponse_171(data.wasPresent, data.wasNull, data.value, data.originalValue); - }; + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum8Argument, this, OnSuccessCallback_272, OnFailureCallback_272)); + return CHIP_NO_ERROR; + } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_171(status); - }; + void OnFailureResponse_272(EmberAfStatus status) { ThrowFailureResponse(); } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + void OnSuccessResponse_272() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableEnum8NullValue_273() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_273, OnFailureCallback_273)); return CHIP_NO_ERROR; } - void OnFailureResponse_171(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_273(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_171(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, - const chip::Optional> & originalValue) + void OnSuccessResponse_273(const chip::app::DataModel::Nullable & nullableEnum8) { - VerifyOrReturn(CheckValue("wasPresent", wasPresent, false)); + VerifyOrReturn(CheckValueNull("nullableEnum8", nullableEnum8)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBooleanNull_172() + CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_274() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBooleanArgument; - nullableBooleanArgument.SetNull(); - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBooleanArgument, this, OnSuccessCallback_172, OnFailureCallback_172)); + chip::app::DataModel::Nullable nullableEnum16Argument; + nullableEnum16Argument.SetNonNull() = 65534U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum16Argument, this, OnSuccessCallback_274, OnFailureCallback_274)); return CHIP_NO_ERROR; } - void OnFailureResponse_172(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_274(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_172() { NextTest(); } + void OnSuccessResponse_274() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBooleanNull_173() + CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_275() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_173, OnFailureCallback_173)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_275, OnFailureCallback_275)); return CHIP_NO_ERROR; } - void OnFailureResponse_173(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_275(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_173(const chip::app::DataModel::Nullable & nullableBoolean) + void OnSuccessResponse_275(const chip::app::DataModel::Nullable & nullableEnum16) { - VerifyOrReturn(CheckValueNull("nullableBoolean", nullableBoolean)); + VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); + VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBooleanTrue_174() + CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_276() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBooleanArgument; - nullableBooleanArgument.SetNonNull() = true; + chip::app::DataModel::Nullable nullableEnum16Argument; + nullableEnum16Argument.SetNonNull() = 65535U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBooleanArgument, this, OnSuccessCallback_174, OnFailureCallback_174)); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum16Argument, this, OnSuccessCallback_276, OnFailureCallback_276)); return CHIP_NO_ERROR; } - void OnFailureResponse_174(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_276(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_174() { NextTest(); } + void OnSuccessResponse_276() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBooleanTrue_175() + CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_277() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_175, OnFailureCallback_175)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_277, OnFailureCallback_277)); return CHIP_NO_ERROR; } - void OnFailureResponse_175(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_277(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_175(const chip::app::DataModel::Nullable & nullableBoolean) + void OnSuccessResponse_277(const chip::app::DataModel::Nullable & nullableEnum16) { - VerifyOrReturn(CheckValueNonNull("nullableBoolean", nullableBoolean)); - VerifyOrReturn(CheckValue("nullableBoolean.Value()", nullableBoolean.Value(), true)); + VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); + VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_176() + CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_278() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap8Argument; - nullableBitmap8Argument.SetNonNull() = 254; + chip::app::DataModel::Nullable nullableEnum16Argument; + nullableEnum16Argument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_176, OnFailureCallback_176)); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableEnum16Argument, this, OnSuccessCallback_278, OnFailureCallback_278)); return CHIP_NO_ERROR; } - void OnFailureResponse_176(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_278(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_176() { NextTest(); } + void OnSuccessResponse_278() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_177() + CHIP_ERROR TestReadAttributeNullableEnum16NullValue_279() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_177, OnFailureCallback_177)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_279, OnFailureCallback_279)); return CHIP_NO_ERROR; } - void OnFailureResponse_177(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_279(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_177(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_279(const chip::app::DataModel::Nullable & nullableEnum16) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); - VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); + VerifyOrReturn(CheckValueNull("nullableEnum16", nullableEnum16)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_178() + CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_280() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap8Argument; - nullableBitmap8Argument.SetNonNull() = 255; - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_178, OnFailureCallback_178)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_280, OnFailureCallback_280)); return CHIP_NO_ERROR; } - void OnFailureResponse_178(EmberAfStatus status) + void OnFailureResponse_280(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_280(const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); + VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), + chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); + NextTest(); } - void OnSuccessResponse_178() { ThrowSuccessResponse(); } + CHIP_ERROR TestWriteAttributeNullableOctetString_281() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_179() + chip::app::DataModel::Nullable nullableOctetStringArgument; + nullableOctetStringArgument.SetNonNull() = + chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableOctetStringArgument, this, OnSuccessCallback_281, OnFailureCallback_281)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_281(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_281() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableOctetString_282() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_179, OnFailureCallback_179)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_282, OnFailureCallback_282)); return CHIP_NO_ERROR; } - void OnFailureResponse_179(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_282(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_179(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_282(const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); - VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); + VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); + VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), + chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_180() + CHIP_ERROR TestWriteAttributeNullableOctetString_283() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap8Argument; - nullableBitmap8Argument.SetNull(); + chip::app::DataModel::Nullable nullableOctetStringArgument; + nullableOctetStringArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_180, OnFailureCallback_180)); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableOctetStringArgument, this, OnSuccessCallback_283, OnFailureCallback_283)); return CHIP_NO_ERROR; } - void OnFailureResponse_180(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_283(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_180() { NextTest(); } + void OnSuccessResponse_283() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_181() + CHIP_ERROR TestReadAttributeNullableOctetString_284() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_181, OnFailureCallback_181)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_284, OnFailureCallback_284)); return CHIP_NO_ERROR; } - void OnFailureResponse_181(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_284(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_181(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_284(const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValueNull("nullableBitmap8", nullableBitmap8)); + VerifyOrReturn(CheckValueNull("nullableOctetString", nullableOctetString)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_182() + CHIP_ERROR TestWriteAttributeNullableOctetString_285() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap16Argument; - nullableBitmap16Argument.SetNonNull() = 65534U; + chip::app::DataModel::Nullable nullableOctetStringArgument; + nullableOctetStringArgument.SetNonNull() = + chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_182, OnFailureCallback_182)); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableOctetStringArgument, this, OnSuccessCallback_285, OnFailureCallback_285)); return CHIP_NO_ERROR; } - void OnFailureResponse_182(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_285(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_182() { NextTest(); } + void OnSuccessResponse_285() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_183() + CHIP_ERROR TestReadAttributeNullableOctetString_286() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_183, OnFailureCallback_183)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_286, OnFailureCallback_286)); return CHIP_NO_ERROR; } - void OnFailureResponse_183(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_286(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_183(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_286(const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); - VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); + VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); + VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), + chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_184() + CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_287() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap16Argument; - nullableBitmap16Argument.SetNonNull() = 65535U; - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_184, OnFailureCallback_184)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_287, OnFailureCallback_287)); return CHIP_NO_ERROR; } - void OnFailureResponse_184(EmberAfStatus status) + void OnFailureResponse_287(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_287(const chip::app::DataModel::Nullable & nullableCharString) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); + VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0))); + NextTest(); } - void OnSuccessResponse_184() { ThrowSuccessResponse(); } + CHIP_ERROR TestWriteAttributeNullableCharString_288() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_185() + chip::app::DataModel::Nullable nullableCharStringArgument; + nullableCharStringArgument.SetNonNull() = chip::Span("☉T☉garbage: not in length on purpose", 7); + + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableCharStringArgument, this, OnSuccessCallback_288, OnFailureCallback_288)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_288(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_288() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableCharString_289() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_185, OnFailureCallback_185)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_289, OnFailureCallback_289)); return CHIP_NO_ERROR; } - void OnFailureResponse_185(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_289(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_185(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_289(const chip::app::DataModel::Nullable & nullableCharString) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); - VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); + VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); + VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("☉T☉", 7))); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_186() + CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_290() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap16Argument; - nullableBitmap16Argument.SetNull(); + chip::app::DataModel::Nullable nullableCharStringArgument; + nullableCharStringArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_186, OnFailureCallback_186)); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableCharStringArgument, this, OnSuccessCallback_290, OnFailureCallback_290)); return CHIP_NO_ERROR; } - void OnFailureResponse_186(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_290(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_186() { NextTest(); } + void OnSuccessResponse_290() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_187() + CHIP_ERROR TestReadAttributeNullableCharString_291() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_187, OnFailureCallback_187)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_291, OnFailureCallback_291)); return CHIP_NO_ERROR; } - void OnFailureResponse_187(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_291(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_187(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_291(const chip::app::DataModel::Nullable & nullableCharString) { - VerifyOrReturn(CheckValueNull("nullableBitmap16", nullableBitmap16)); + VerifyOrReturn(CheckValueNull("nullableCharString", nullableCharString)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_188() + CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_292() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap32Argument; - nullableBitmap32Argument.SetNonNull() = 4294967294UL; + chip::app::DataModel::Nullable nullableCharStringArgument; + nullableCharStringArgument.SetNonNull() = chip::Span("garbage: not in length on purpose", 0); - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_188, OnFailureCallback_188)); + ReturnErrorOnFailure(cluster.WriteAttribute( + nullableCharStringArgument, this, OnSuccessCallback_292, OnFailureCallback_292)); return CHIP_NO_ERROR; } - void OnFailureResponse_188(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_292(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_188() { NextTest(); } + void OnSuccessResponse_292() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_189() + CHIP_ERROR TestReadAttributeNullableCharString_293() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_189, OnFailureCallback_189)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_293, OnFailureCallback_293)); return CHIP_NO_ERROR; } - void OnFailureResponse_189(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_293(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_189(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_293(const chip::app::DataModel::Nullable & nullableCharString) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); - VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); + VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); + VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0))); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_190() + CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_294() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 200; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap32Argument; - nullableBitmap32Argument.SetNonNull() = 4294967295UL; - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_190, OnFailureCallback_190)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_294, OnFailureCallback_294)); return CHIP_NO_ERROR; } - void OnFailureResponse_190(EmberAfStatus status) + void OnFailureResponse_294(EmberAfStatus status) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); NextTest(); } - void OnSuccessResponse_190() { ThrowSuccessResponse(); } + void OnSuccessResponse_294(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_191() + CHIP_ERROR TestReadAttributeFromNonexistentCluster_295() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_191, OnFailureCallback_191)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_295, OnFailureCallback_295)); return CHIP_NO_ERROR; } - void OnFailureResponse_191(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_191(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnFailureResponse_295(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); - VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); - + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_192() + void OnSuccessResponse_295(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } + + CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_296() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - chip::app::DataModel::Nullable nullableBitmap32Argument; - nullableBitmap32Argument.SetNull(); - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_192, OnFailureCallback_192)); - return CHIP_NO_ERROR; - } + using RequestType = chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type; - void OnFailureResponse_192(EmberAfStatus status) { ThrowFailureResponse(); } + RequestType request; - void OnSuccessResponse_192() { NextTest(); } + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_296(); + }; - CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_193() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_296(status); + }; - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_193, OnFailureCallback_193)); + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_193(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_193(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnFailureResponse_296(EmberAfStatus status) { - VerifyOrReturn(CheckValueNull("nullableBitmap32", nullableBitmap32)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_VALUE)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_194() + void OnSuccessResponse_296() { ThrowSuccessResponse(); } + + CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_297() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + using RequestType = chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type; - chip::app::DataModel::Nullable nullableBitmap64Argument; - nullableBitmap64Argument.SetNonNull() = 18446744073709551614ULL; + RequestType request; + request.arg1.Emplace() = 1; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_194, OnFailureCallback_194)); + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_297(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_297(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_194(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_297(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_194() { NextTest(); } + void OnSuccessResponse_297() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_195() + CHIP_ERROR TestReportSubscribeToListAttribute_298() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_195, OnFailureCallback_195)); - return CHIP_NO_ERROR; + mTest_TestCluster_list_int8u_Reported = OnSuccessCallback_298; + return WaitForMs(0); } - void OnFailureResponse_195(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_298(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_195(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_298(const chip::app::DataModel::DecodableList & listInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); - VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); + mReceivedReport_298 = true; - NextTest(); + auto iter = listInt8u.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 0)); + VerifyOrReturn(CheckValue("listInt8u[0]", iter.GetValue(), 1)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 1)); + VerifyOrReturn(CheckValue("listInt8u[1]", iter.GetValue(), 2)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 2)); + VerifyOrReturn(CheckValue("listInt8u[2]", iter.GetValue(), 3)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 3)); + VerifyOrReturn(CheckValue("listInt8u[3]", iter.GetValue(), 4)); + VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter, 4)); } - CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_196() + CHIP_ERROR TestSubscribeToListAttribute_299() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap64Argument; - nullableBitmap64Argument.SetNonNull() = 18446744073709551615ULL; + uint16_t minIntervalArgument; + minIntervalArgument = 2U; + uint16_t maxIntervalArgument; + maxIntervalArgument = 10U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_196, OnFailureCallback_196)); + ReturnErrorOnFailure(cluster.SubscribeAttribute( + this, OnSuccessCallback_299, OnFailureCallback_299, minIntervalArgument, maxIntervalArgument, + OnSubscriptionEstablished_299)); return CHIP_NO_ERROR; } - void OnFailureResponse_196(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } - - void OnSuccessResponse_196() { ThrowSuccessResponse(); } + void OnFailureResponse_299(EmberAfStatus status) { ThrowFailureResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_197() + void OnSuccessResponse_299(const chip::app::DataModel::DecodableList & value) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_197, OnFailureCallback_197)); - return CHIP_NO_ERROR; + if (mTest_TestCluster_list_int8u_Reported) + { + auto callback = mTest_TestCluster_list_int8u_Reported; + mTest_TestCluster_list_int8u_Reported = nullptr; + callback(this, value); + } } - void OnFailureResponse_197(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_197(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSubscriptionEstablishedResponse_299() { - VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); - VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); - + VerifyOrReturn(mReceivedReport_298, Exit("Initial report not received!")); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_198() + CHIP_ERROR TestWriteSubscribedToListAttribute_300() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap64Argument; - nullableBitmap64Argument.SetNull(); + chip::app::DataModel::List listInt8uArgument; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_198, OnFailureCallback_198)); + uint8_t listInt8uList[4]; + listInt8uList[0] = 5; + listInt8uList[1] = 6; + listInt8uList[2] = 7; + listInt8uList[3] = 8; + listInt8uArgument = listInt8uList; + + ReturnErrorOnFailure(cluster.WriteAttribute( + listInt8uArgument, this, OnSuccessCallback_300, OnFailureCallback_300)); return CHIP_NO_ERROR; } - void OnFailureResponse_198(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_300(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_198() { NextTest(); } + void OnSuccessResponse_300() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_199() + CHIP_ERROR TestCheckForListAttributeReport_301() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_199, OnFailureCallback_199)); + mTest_TestCluster_list_int8u_Reported = OnSuccessCallback_301; return CHIP_NO_ERROR; } - void OnFailureResponse_199(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_301(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_199(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_301(const chip::app::DataModel::DecodableList & listInt8u) { - VerifyOrReturn(CheckValueNull("nullableBitmap64", nullableBitmap64)); + mReceivedReport_301 = true; + + auto iter = listInt8u.begin(); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 0)); + VerifyOrReturn(CheckValue("listInt8u[0]", iter.GetValue(), 5)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 1)); + VerifyOrReturn(CheckValue("listInt8u[1]", iter.GetValue(), 6)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 2)); + VerifyOrReturn(CheckValue("listInt8u[2]", iter.GetValue(), 7)); + VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 3)); + VerifyOrReturn(CheckValue("listInt8u[3]", iter.GetValue(), 8)); + VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter, 4)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_200() + CHIP_ERROR TestReadRangeRestrictedUnsigned8BitInteger_302() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt8uArgument; - nullableInt8uArgument.SetNonNull() = 254; - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_200, OnFailureCallback_200)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_302, OnFailureCallback_302)); return CHIP_NO_ERROR; } - void OnFailureResponse_200(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_302(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_200() { NextTest(); } + void OnSuccessResponse_302(uint8_t rangeRestrictedInt8u) + { + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u, 70)); - CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_201() + NextTest(); + } + + CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_303() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_201, OnFailureCallback_201)); + uint8_t rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = 0; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_303, OnFailureCallback_303)); return CHIP_NO_ERROR; } - void OnFailureResponse_201(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_201(const chip::app::DataModel::Nullable & nullableInt8u) + void OnFailureResponse_303(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_202() + void OnSuccessResponse_303() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_304() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt8uArgument; - nullableInt8uArgument.SetNonNull() = 255; + uint8_t rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = 19; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_202, OnFailureCallback_202)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_304, OnFailureCallback_304)); return CHIP_NO_ERROR; } - void OnFailureResponse_202(EmberAfStatus status) + void OnFailureResponse_304(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - void OnSuccessResponse_202() { ThrowSuccessResponse(); } + void OnSuccessResponse_304() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_203() + CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_305() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_203, OnFailureCallback_203)); + uint8_t rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = 101; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_305, OnFailureCallback_305)); return CHIP_NO_ERROR; } - void OnFailureResponse_203(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_203(const chip::app::DataModel::Nullable & nullableInt8u) + void OnFailureResponse_305(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_204() + void OnSuccessResponse_305() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_306() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt8uArgument; - nullableInt8uArgument.SetNull(); + uint8_t rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = 255; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_204, OnFailureCallback_204)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_306, OnFailureCallback_306)); return CHIP_NO_ERROR; } - void OnFailureResponse_204(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_306(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_204() { NextTest(); } + void OnSuccessResponse_306() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt8uNullValue_205() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_307() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_205, OnFailureCallback_205)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_307, OnFailureCallback_307)); return CHIP_NO_ERROR; } - void OnFailureResponse_205(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_307(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_205(const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_307(uint8_t rangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNull("nullableInt8u", nullableInt8u)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u, 70)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_206() + CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_308() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt16uArgument; - nullableInt16uArgument.SetNonNull() = 65534U; + uint8_t rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = 20; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_206, OnFailureCallback_206)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_308, OnFailureCallback_308)); return CHIP_NO_ERROR; } - void OnFailureResponse_206(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_308(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_206() { NextTest(); } + void OnSuccessResponse_308() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_207() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_309() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_207, OnFailureCallback_207)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_309, OnFailureCallback_309)); return CHIP_NO_ERROR; } - void OnFailureResponse_207(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_309(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_207(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_309(uint8_t rangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); - VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u, 20)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_208() + CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_310() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt16uArgument; - nullableInt16uArgument.SetNonNull() = 65535U; + uint8_t rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = 100; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_208, OnFailureCallback_208)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_310, OnFailureCallback_310)); return CHIP_NO_ERROR; } - void OnFailureResponse_208(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } + void OnFailureResponse_310(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_208() { ThrowSuccessResponse(); } + void OnSuccessResponse_310() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_209() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_311() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_209, OnFailureCallback_209)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_311, OnFailureCallback_311)); return CHIP_NO_ERROR; } - void OnFailureResponse_209(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_311(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_209(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_311(uint8_t rangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); - VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u, 100)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_210() + CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_312() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt16uArgument; - nullableInt16uArgument.SetNull(); + uint8_t rangeRestrictedInt8uArgument; + rangeRestrictedInt8uArgument = 50; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_210, OnFailureCallback_210)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8uArgument, this, OnSuccessCallback_312, OnFailureCallback_312)); return CHIP_NO_ERROR; } - void OnFailureResponse_210(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_312(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_210() { NextTest(); } + void OnSuccessResponse_312() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uNullValue_211() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_313() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_211, OnFailureCallback_211)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_313, OnFailureCallback_313)); return CHIP_NO_ERROR; } - void OnFailureResponse_211(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_313(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_211(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_313(uint8_t rangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNull("nullableInt16u", nullableInt16u)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", rangeRestrictedInt8u, 50)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_212() + CHIP_ERROR TestReadRangeRestrictedUnsigned16BitInteger_314() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt32uArgument; - nullableInt32uArgument.SetNonNull() = 4294967294UL; - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_212, OnFailureCallback_212)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_314, OnFailureCallback_314)); return CHIP_NO_ERROR; } - void OnFailureResponse_212(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_314(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_212() { NextTest(); } + void OnSuccessResponse_314(uint16_t rangeRestrictedInt16u) + { + VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u, 200U)); - CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_213() + NextTest(); + } + + CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_315() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_213, OnFailureCallback_213)); + uint16_t rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = 0U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_315, OnFailureCallback_315)); return CHIP_NO_ERROR; } - void OnFailureResponse_213(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_213(const chip::app::DataModel::Nullable & nullableInt32u) + void OnFailureResponse_315(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); - VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_214() + void OnSuccessResponse_315() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_316() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt32uArgument; - nullableInt32uArgument.SetNonNull() = 4294967295UL; + uint16_t rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = 99U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_214, OnFailureCallback_214)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_316, OnFailureCallback_316)); return CHIP_NO_ERROR; } - void OnFailureResponse_214(EmberAfStatus status) + void OnFailureResponse_316(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - void OnSuccessResponse_214() { ThrowSuccessResponse(); } + void OnSuccessResponse_316() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_215() + CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_317() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_215, OnFailureCallback_215)); + uint16_t rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = 1001U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_317, OnFailureCallback_317)); return CHIP_NO_ERROR; } - void OnFailureResponse_215(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_215(const chip::app::DataModel::Nullable & nullableInt32u) + void OnFailureResponse_317(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); - VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_216() + void OnSuccessResponse_317() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_318() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt32uArgument; - nullableInt32uArgument.SetNull(); + uint16_t rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = 65535U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_216, OnFailureCallback_216)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_318, OnFailureCallback_318)); return CHIP_NO_ERROR; } - void OnFailureResponse_216(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_318(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_216() { NextTest(); } + void OnSuccessResponse_318() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt32uNullValue_217() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_319() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_217, OnFailureCallback_217)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_319, OnFailureCallback_319)); return CHIP_NO_ERROR; } - void OnFailureResponse_217(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_319(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_217(const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_319(uint16_t rangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNull("nullableInt32u", nullableInt32u)); + VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u, 200U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_218() + CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_320() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt64uArgument; - nullableInt64uArgument.SetNonNull() = 18446744073709551614ULL; + uint16_t rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = 100U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_218, OnFailureCallback_218)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_320, OnFailureCallback_320)); return CHIP_NO_ERROR; } - void OnFailureResponse_218(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_320(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_218() { NextTest(); } + void OnSuccessResponse_320() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_219() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_321() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_219, OnFailureCallback_219)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_321, OnFailureCallback_321)); return CHIP_NO_ERROR; } - void OnFailureResponse_219(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_321(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_219(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_321(uint16_t rangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); - VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); + VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u, 100U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_220() + CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_322() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt64uArgument; - nullableInt64uArgument.SetNonNull() = 18446744073709551615ULL; + uint16_t rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = 1000U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_220, OnFailureCallback_220)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_322, OnFailureCallback_322)); return CHIP_NO_ERROR; } - void OnFailureResponse_220(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } + void OnFailureResponse_322(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_220() { ThrowSuccessResponse(); } + void OnSuccessResponse_322() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_221() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_323() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_221, OnFailureCallback_221)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_323, OnFailureCallback_323)); return CHIP_NO_ERROR; } - void OnFailureResponse_221(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_323(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_221(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_323(uint16_t rangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); - VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); + VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u, 1000U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_222() + CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_324() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt64uArgument; - nullableInt64uArgument.SetNull(); + uint16_t rangeRestrictedInt16uArgument; + rangeRestrictedInt16uArgument = 500U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_222, OnFailureCallback_222)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16uArgument, this, OnSuccessCallback_324, OnFailureCallback_324)); return CHIP_NO_ERROR; } - void OnFailureResponse_222(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_324(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_222() { NextTest(); } + void OnSuccessResponse_324() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uNullValue_223() + CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_325() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_223, OnFailureCallback_223)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_325, OnFailureCallback_325)); return CHIP_NO_ERROR; } - void OnFailureResponse_223(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_325(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_223(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_325(uint16_t rangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNull("nullableInt64u", nullableInt64u)); + VerifyOrReturn(CheckValue("rangeRestrictedInt16u", rangeRestrictedInt16u, 500U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_224() + CHIP_ERROR TestReadRangeRestrictedSigned8BitInteger_326() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt8sArgument; - nullableInt8sArgument.SetNonNull() = -127; - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_224, OnFailureCallback_224)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_326, OnFailureCallback_326)); return CHIP_NO_ERROR; } - void OnFailureResponse_224(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_326(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_224() { NextTest(); } + void OnSuccessResponse_326(int8_t rangeRestrictedInt8s) + { + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, 0)); - CHIP_ERROR TestReadAttributeNullableInt8sMinValue_225() + NextTest(); + } + + CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned8BitInteger_327() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_225, OnFailureCallback_225)); + int8_t rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = -128; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_327, OnFailureCallback_327)); return CHIP_NO_ERROR; } - void OnFailureResponse_225(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_225(const chip::app::DataModel::Nullable & nullableInt8s) + void OnFailureResponse_327(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); - VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_226() + void OnSuccessResponse_327() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_328() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt8sArgument; - nullableInt8sArgument.SetNonNull() = -128; + int8_t rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = -41; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_226, OnFailureCallback_226)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_328, OnFailureCallback_328)); return CHIP_NO_ERROR; } - void OnFailureResponse_226(EmberAfStatus status) + void OnFailureResponse_328(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - void OnSuccessResponse_226() { ThrowSuccessResponse(); } + void OnSuccessResponse_328() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_227() + CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_329() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_227, OnFailureCallback_227)); + int8_t rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = 51; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_329, OnFailureCallback_329)); return CHIP_NO_ERROR; } - void OnFailureResponse_227(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_227(const chip::app::DataModel::Nullable & nullableInt8s) + void OnFailureResponse_329(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); - VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_228() + void OnSuccessResponse_329() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned8BitInteger_330() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt8sArgument; - nullableInt8sArgument.SetNull(); + int8_t rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = 127; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_228, OnFailureCallback_228)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_330, OnFailureCallback_330)); return CHIP_NO_ERROR; } - void OnFailureResponse_228(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_330(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_228() { NextTest(); } + void OnSuccessResponse_330() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt8sNullValue_229() + CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_331() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_229, OnFailureCallback_229)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_331, OnFailureCallback_331)); return CHIP_NO_ERROR; } - void OnFailureResponse_229(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_331(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_229(const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_331(int8_t rangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNull("nullableInt8s", nullableInt8s)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_230() + CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_332() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt16sArgument; - nullableInt16sArgument.SetNonNull() = -32767; + int8_t rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = -40; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_230, OnFailureCallback_230)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_332, OnFailureCallback_332)); return CHIP_NO_ERROR; } - void OnFailureResponse_230(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_332(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_230() { NextTest(); } + void OnSuccessResponse_332() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sMinValue_231() + CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_333() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_231, OnFailureCallback_231)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_333, OnFailureCallback_333)); return CHIP_NO_ERROR; } - void OnFailureResponse_231(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_333(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_231(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_333(int8_t rangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); - VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, -40)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_232() + CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_334() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt16sArgument; - nullableInt16sArgument.SetNonNull() = -32768; + int8_t rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = 50; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_232, OnFailureCallback_232)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_334, OnFailureCallback_334)); return CHIP_NO_ERROR; } - void OnFailureResponse_232(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } + void OnFailureResponse_334(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_232() { ThrowSuccessResponse(); } + void OnSuccessResponse_334() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_233() + CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_335() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_233, OnFailureCallback_233)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_335, OnFailureCallback_335)); return CHIP_NO_ERROR; } - void OnFailureResponse_233(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_335(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_233(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_335(int8_t rangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); - VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, 50)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_234() + CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_336() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt16sArgument; - nullableInt16sArgument.SetNull(); + int8_t rangeRestrictedInt8sArgument; + rangeRestrictedInt8sArgument = 6; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_234, OnFailureCallback_234)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt8sArgument, this, OnSuccessCallback_336, OnFailureCallback_336)); return CHIP_NO_ERROR; } - void OnFailureResponse_234(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_336(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_234() { NextTest(); } + void OnSuccessResponse_336() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sNullValue_235() + CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_337() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_235, OnFailureCallback_235)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_337, OnFailureCallback_337)); return CHIP_NO_ERROR; } - void OnFailureResponse_235(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_337(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_235(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_337(int8_t rangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNull("nullableInt16s", nullableInt16s)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, 6)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_236() + CHIP_ERROR TestReadRangeRestrictedSigned16BitInteger_338() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt32sArgument; - nullableInt32sArgument.SetNonNull() = -2147483647L; - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_236, OnFailureCallback_236)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_338, OnFailureCallback_338)); return CHIP_NO_ERROR; } - void OnFailureResponse_236(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_338(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_236() { NextTest(); } + void OnSuccessResponse_338(int16_t rangeRestrictedInt16s) + { + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, 0)); - CHIP_ERROR TestReadAttributeNullableInt32sMinValue_237() + NextTest(); + } + + CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned16BitInteger_339() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_237, OnFailureCallback_237)); + int16_t rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = -32768; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_339, OnFailureCallback_339)); return CHIP_NO_ERROR; } - void OnFailureResponse_237(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_237(const chip::app::DataModel::Nullable & nullableInt32s) + void OnFailureResponse_339(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); - VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_238() + void OnSuccessResponse_339() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_340() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt32sArgument; - nullableInt32sArgument.SetNonNull() = -2147483648L; + int16_t rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = -151; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_238, OnFailureCallback_238)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_340, OnFailureCallback_340)); return CHIP_NO_ERROR; } - void OnFailureResponse_238(EmberAfStatus status) + void OnFailureResponse_340(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - void OnSuccessResponse_238() { ThrowSuccessResponse(); } + void OnSuccessResponse_340() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_239() + CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_341() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_239, OnFailureCallback_239)); + int16_t rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = 201; + + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_341, OnFailureCallback_341)); return CHIP_NO_ERROR; } - void OnFailureResponse_239(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_239(const chip::app::DataModel::Nullable & nullableInt32s) + void OnFailureResponse_341(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); - VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_240() + void OnSuccessResponse_341() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned16BitInteger_342() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt32sArgument; - nullableInt32sArgument.SetNull(); + int16_t rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = 32767; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_240, OnFailureCallback_240)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_342, OnFailureCallback_342)); return CHIP_NO_ERROR; } - void OnFailureResponse_240(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_342(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_240() { NextTest(); } + void OnSuccessResponse_342() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt32sNullValue_241() + CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_343() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_241, OnFailureCallback_241)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_343, OnFailureCallback_343)); return CHIP_NO_ERROR; } - void OnFailureResponse_241(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_343(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_241(const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_343(int16_t rangeRestrictedInt16s) { - VerifyOrReturn(CheckValueNull("nullableInt32s", nullableInt32s)); + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_242() + CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_344() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt64sArgument; - nullableInt64sArgument.SetNonNull() = -9223372036854775807LL; + int16_t rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = -150; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_242, OnFailureCallback_242)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_344, OnFailureCallback_344)); return CHIP_NO_ERROR; } - void OnFailureResponse_242(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_344(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_242() { NextTest(); } + void OnSuccessResponse_344() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sMinValue_243() + CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_345() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_243, OnFailureCallback_243)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_345, OnFailureCallback_345)); return CHIP_NO_ERROR; } - void OnFailureResponse_243(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_345(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_243(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_345(int16_t rangeRestrictedInt16s) { - VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); - VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, -150)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_244() + CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_346() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt64sArgument; - nullableInt64sArgument.SetNonNull() = -9223372036854775807LL - 1; + int16_t rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = 200; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_244, OnFailureCallback_244)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_346, OnFailureCallback_346)); return CHIP_NO_ERROR; } - void OnFailureResponse_244(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } + void OnFailureResponse_346(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_244() { ThrowSuccessResponse(); } + void OnSuccessResponse_346() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_245() + CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_347() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_245, OnFailureCallback_245)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_347, OnFailureCallback_347)); return CHIP_NO_ERROR; } - void OnFailureResponse_245(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_347(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_245(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_347(int16_t rangeRestrictedInt16s) { - VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); - VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, 200)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_246() + CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_348() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableInt64sArgument; - nullableInt64sArgument.SetNull(); + int16_t rangeRestrictedInt16sArgument; + rangeRestrictedInt16sArgument = 7; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_246, OnFailureCallback_246)); + ReturnErrorOnFailure(cluster.WriteAttribute( + rangeRestrictedInt16sArgument, this, OnSuccessCallback_348, OnFailureCallback_348)); return CHIP_NO_ERROR; } - void OnFailureResponse_246(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_348(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_246() { NextTest(); } + void OnSuccessResponse_348() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sNullValue_247() + CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_349() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_247, OnFailureCallback_247)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_349, OnFailureCallback_349)); return CHIP_NO_ERROR; } - void OnFailureResponse_247(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_349(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_247(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_349(int16_t rangeRestrictedInt16s) { - VerifyOrReturn(CheckValueNull("nullableInt64s", nullableInt64s)); + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, 7)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableSingleMediumValue_248() + CHIP_ERROR TestReadNullableRangeRestrictedUnsigned8BitInteger_350() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableFloatSingleArgument; - nullableFloatSingleArgument.SetNonNull() = 0.1f; - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableFloatSingleArgument, this, OnSuccessCallback_248, OnFailureCallback_248)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_350, OnFailureCallback_350)); return CHIP_NO_ERROR; } - void OnFailureResponse_248(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_350(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_248() { NextTest(); } + void OnSuccessResponse_350(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) + { + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(), 70)); - CHIP_ERROR TestReadAttributeNullableSingleMediumValue_249() + NextTest(); + } + + CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_351() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_249, OnFailureCallback_249)); + chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument.SetNonNull() = 0; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_351, OnFailureCallback_351)); return CHIP_NO_ERROR; } - void OnFailureResponse_249(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_249(const chip::app::DataModel::Nullable & nullableFloatSingle) + void OnFailureResponse_351(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), 0.1f)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableSingleLargestValue_250() + void OnSuccessResponse_351() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_352() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableFloatSingleArgument; - nullableFloatSingleArgument.SetNonNull() = INFINITY; + chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument.SetNonNull() = 19; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableFloatSingleArgument, this, OnSuccessCallback_250, OnFailureCallback_250)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_352, OnFailureCallback_352)); return CHIP_NO_ERROR; } - void OnFailureResponse_250(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_352(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_250() { NextTest(); } + void OnSuccessResponse_352() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableSingleLargestValue_251() + CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_353() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_251, OnFailureCallback_251)); + chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument.SetNonNull() = 101; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_353, OnFailureCallback_353)); return CHIP_NO_ERROR; } - void OnFailureResponse_251(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_251(const chip::app::DataModel::Nullable & nullableFloatSingle) + void OnFailureResponse_353(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), INFINITY)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableSingleSmallestValue_252() + void OnSuccessResponse_353() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_354() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableFloatSingleArgument; - nullableFloatSingleArgument.SetNonNull() = -INFINITY; + chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument.SetNonNull() = 254; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableFloatSingleArgument, this, OnSuccessCallback_252, OnFailureCallback_252)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_354, OnFailureCallback_354)); return CHIP_NO_ERROR; } - void OnFailureResponse_252(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_354(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_252() { NextTest(); } + void OnSuccessResponse_354() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableSingleSmallestValue_253() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_355() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_253, OnFailureCallback_253)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_355, OnFailureCallback_355)); return CHIP_NO_ERROR; } - void OnFailureResponse_253(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_355(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_253(const chip::app::DataModel::Nullable & nullableFloatSingle) + void OnSuccessResponse_355(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), -INFINITY)); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(), 70)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableSingleNullValue_254() + CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_356() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableFloatSingleArgument; - nullableFloatSingleArgument.SetNull(); + chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument.SetNonNull() = 20; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableFloatSingleArgument, this, OnSuccessCallback_254, OnFailureCallback_254)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_356, OnFailureCallback_356)); return CHIP_NO_ERROR; } - void OnFailureResponse_254(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_356(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_254() { NextTest(); } + void OnSuccessResponse_356() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableSingleNullValue_255() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_357() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_255, OnFailureCallback_255)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_357, OnFailureCallback_357)); return CHIP_NO_ERROR; } - void OnFailureResponse_255(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_357(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_255(const chip::app::DataModel::Nullable & nullableFloatSingle) + void OnSuccessResponse_357(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNull("nullableFloatSingle", nullableFloatSingle)); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(), 20)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableSingle0Value_256() + CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_358() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableFloatSingleArgument; - nullableFloatSingleArgument.SetNonNull() = 0.0f; + chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument.SetNonNull() = 100; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableFloatSingleArgument, this, OnSuccessCallback_256, OnFailureCallback_256)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_358, OnFailureCallback_358)); return CHIP_NO_ERROR; } - void OnFailureResponse_256(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_358(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_256() { NextTest(); } + void OnSuccessResponse_358() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableSingle0Value_257() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_359() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_257, OnFailureCallback_257)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_359, OnFailureCallback_359)); return CHIP_NO_ERROR; } - void OnFailureResponse_257(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_359(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_257(const chip::app::DataModel::Nullable & nullableFloatSingle) + void OnSuccessResponse_359(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", nullableFloatSingle)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", nullableFloatSingle.Value(), 0.0f)); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(), 100)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableDoubleMediumValue_258() + CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_360() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableFloatDoubleArgument; - nullableFloatDoubleArgument.SetNonNull() = 0.1234567890123; + chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument.SetNonNull() = 50; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableFloatDoubleArgument, this, OnSuccessCallback_258, OnFailureCallback_258)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_360, OnFailureCallback_360)); return CHIP_NO_ERROR; } - void OnFailureResponse_258(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_360(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_258() { NextTest(); } + void OnSuccessResponse_360() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableDoubleMediumValue_259() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_361() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_259, OnFailureCallback_259)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_361, OnFailureCallback_361)); return CHIP_NO_ERROR; } - void OnFailureResponse_259(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_361(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_259(const chip::app::DataModel::Nullable & nullableFloatDouble) + void OnSuccessResponse_361(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), 0.1234567890123)); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", nullableRangeRestrictedInt8u.Value(), 50)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableDoubleLargestValue_260() + CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_362() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableFloatDoubleArgument; - nullableFloatDoubleArgument.SetNonNull() = INFINITY; + chip::app::DataModel::Nullable nullableRangeRestrictedInt8uArgument; + nullableRangeRestrictedInt8uArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableFloatDoubleArgument, this, OnSuccessCallback_260, OnFailureCallback_260)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8uArgument, this, OnSuccessCallback_362, OnFailureCallback_362)); return CHIP_NO_ERROR; } - void OnFailureResponse_260(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_362(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_260() { NextTest(); } + void OnSuccessResponse_362() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableDoubleLargestValue_261() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_363() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_261, OnFailureCallback_261)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_363, OnFailureCallback_363)); return CHIP_NO_ERROR; } - void OnFailureResponse_261(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_363(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_261(const chip::app::DataModel::Nullable & nullableFloatDouble) + void OnSuccessResponse_363(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8u) { - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), INFINITY)); + VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt8u", nullableRangeRestrictedInt8u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableDoubleSmallestValue_262() + CHIP_ERROR TestReadNullableRangeRestrictedUnsigned16BitInteger_364() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableFloatDoubleArgument; - nullableFloatDoubleArgument.SetNonNull() = -INFINITY; - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableFloatDoubleArgument, this, OnSuccessCallback_262, OnFailureCallback_262)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_364, OnFailureCallback_364)); return CHIP_NO_ERROR; } - void OnFailureResponse_262(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_364(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_262() { NextTest(); } + void OnSuccessResponse_364(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) + { + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(), 200U)); - CHIP_ERROR TestReadAttributeNullableDoubleSmallestValue_263() + NextTest(); + } + + CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_365() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_263, OnFailureCallback_263)); + chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument.SetNonNull() = 0U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_365, OnFailureCallback_365)); return CHIP_NO_ERROR; } - void OnFailureResponse_263(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_263(const chip::app::DataModel::Nullable & nullableFloatDouble) + void OnFailureResponse_365(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), -INFINITY)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableDoubleNullValue_264() + void OnSuccessResponse_365() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_366() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableFloatDoubleArgument; - nullableFloatDoubleArgument.SetNull(); + chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument.SetNonNull() = 99U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableFloatDoubleArgument, this, OnSuccessCallback_264, OnFailureCallback_264)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_366, OnFailureCallback_366)); return CHIP_NO_ERROR; } - void OnFailureResponse_264(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_366(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_264() { NextTest(); } + void OnSuccessResponse_366() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableDoubleNullValue_265() + CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_367() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_265, OnFailureCallback_265)); + chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument.SetNonNull() = 1001U; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_367, OnFailureCallback_367)); return CHIP_NO_ERROR; } - void OnFailureResponse_265(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_265(const chip::app::DataModel::Nullable & nullableFloatDouble) + void OnFailureResponse_367(EmberAfStatus status) { - VerifyOrReturn(CheckValueNull("nullableFloatDouble", nullableFloatDouble)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableDouble0Value_266() + void OnSuccessResponse_367() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_368() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableFloatDoubleArgument; - nullableFloatDoubleArgument.SetNonNull() = 0; + chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument.SetNonNull() = 65534U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableFloatDoubleArgument, this, OnSuccessCallback_266, OnFailureCallback_266)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_368, OnFailureCallback_368)); return CHIP_NO_ERROR; } - void OnFailureResponse_266(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_368(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_266() { NextTest(); } + void OnSuccessResponse_368() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableDouble0Value_267() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_369() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_267, OnFailureCallback_267)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_369, OnFailureCallback_369)); return CHIP_NO_ERROR; } - void OnFailureResponse_267(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_369(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_267(const chip::app::DataModel::Nullable & nullableFloatDouble) + void OnSuccessResponse_369(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", nullableFloatDouble)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", nullableFloatDouble.Value(), 0)); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(), 200U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_268() + CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_370() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableEnum8Argument; - nullableEnum8Argument.SetNonNull() = 254; + chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument.SetNonNull() = 100U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_268, OnFailureCallback_268)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_370, OnFailureCallback_370)); return CHIP_NO_ERROR; } - void OnFailureResponse_268(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_370(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_268() { NextTest(); } + void OnSuccessResponse_370() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_269() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_371() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_269, OnFailureCallback_269)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_371, OnFailureCallback_371)); return CHIP_NO_ERROR; } - void OnFailureResponse_269(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_371(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_269(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_371(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); - VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(), 100U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_270() + CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_372() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableEnum8Argument; - nullableEnum8Argument.SetNonNull() = 255; + chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument.SetNonNull() = 1000U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_270, OnFailureCallback_270)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_372, OnFailureCallback_372)); return CHIP_NO_ERROR; } - void OnFailureResponse_270(EmberAfStatus status) - { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - } + void OnFailureResponse_372(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_270() { ThrowSuccessResponse(); } + void OnSuccessResponse_372() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_271() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_373() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_271, OnFailureCallback_271)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_373, OnFailureCallback_373)); return CHIP_NO_ERROR; } - void OnFailureResponse_271(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_373(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_271(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_373(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); - VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(), 1000U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_272() + CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_374() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableEnum8Argument; - nullableEnum8Argument.SetNull(); + chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument.SetNonNull() = 500U; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_272, OnFailureCallback_272)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_374, OnFailureCallback_374)); return CHIP_NO_ERROR; } - void OnFailureResponse_272(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_374(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_272() { NextTest(); } + void OnSuccessResponse_374() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8NullValue_273() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_375() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_273, OnFailureCallback_273)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_375, OnFailureCallback_375)); return CHIP_NO_ERROR; } - void OnFailureResponse_273(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_375(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_273(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_375(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNull("nullableEnum8", nullableEnum8)); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", nullableRangeRestrictedInt16u.Value(), 500U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_274() + CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_376() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableEnum16Argument; - nullableEnum16Argument.SetNonNull() = 65534U; + chip::app::DataModel::Nullable nullableRangeRestrictedInt16uArgument; + nullableRangeRestrictedInt16uArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_274, OnFailureCallback_274)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16uArgument, this, OnSuccessCallback_376, OnFailureCallback_376)); return CHIP_NO_ERROR; } - void OnFailureResponse_274(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_376(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_274() { NextTest(); } + void OnSuccessResponse_376() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_275() + CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_377() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_275, OnFailureCallback_275)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_377, OnFailureCallback_377)); return CHIP_NO_ERROR; } - void OnFailureResponse_275(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_377(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_275(const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_377(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16u) { - VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); - VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); + VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt16u", nullableRangeRestrictedInt16u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_276() + CHIP_ERROR TestReadNullableRangeRestrictedSigned8BitInteger_378() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableEnum16Argument; - nullableEnum16Argument.SetNonNull() = 65535U; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_378, OnFailureCallback_378)); + return CHIP_NO_ERROR; + } - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_276, OnFailureCallback_276)); + void OnFailureResponse_378(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_378(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + { + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), 0)); + + NextTest(); + } + + CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_379() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument.SetNonNull() = -127; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_379, OnFailureCallback_379)); return CHIP_NO_ERROR; } - void OnFailureResponse_276(EmberAfStatus status) + void OnFailureResponse_379(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - void OnSuccessResponse_276() { ThrowSuccessResponse(); } + void OnSuccessResponse_379() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_277() + CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_380() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_277, OnFailureCallback_277)); + chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument.SetNonNull() = -41; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_380, OnFailureCallback_380)); return CHIP_NO_ERROR; } - void OnFailureResponse_277(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_277(const chip::app::DataModel::Nullable & nullableEnum16) + void OnFailureResponse_380(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); - VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_278() + void OnSuccessResponse_380() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_381() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableEnum16Argument; - nullableEnum16Argument.SetNull(); + chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument.SetNonNull() = 51; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_278, OnFailureCallback_278)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_381, OnFailureCallback_381)); return CHIP_NO_ERROR; } - void OnFailureResponse_278(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_381(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_278() { NextTest(); } + void OnSuccessResponse_381() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableEnum16NullValue_279() + CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_382() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_279, OnFailureCallback_279)); + chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument.SetNonNull() = 127; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_382, OnFailureCallback_382)); return CHIP_NO_ERROR; } - void OnFailureResponse_279(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_279(const chip::app::DataModel::Nullable & nullableEnum16) + void OnFailureResponse_382(EmberAfStatus status) { - VerifyOrReturn(CheckValueNull("nullableEnum16", nullableEnum16)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_280() + void OnSuccessResponse_382() { ThrowSuccessResponse(); } + + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_383() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_280, OnFailureCallback_280)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_383, OnFailureCallback_383)); return CHIP_NO_ERROR; } - void OnFailureResponse_280(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_383(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_280(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_383(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); - VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), - chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_281() + CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_384() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableOctetStringArgument; - nullableOctetStringArgument.SetNonNull() = - chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); + chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument.SetNonNull() = -40; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_281, OnFailureCallback_281)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_384, OnFailureCallback_384)); return CHIP_NO_ERROR; } - void OnFailureResponse_281(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_384(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_281() { NextTest(); } + void OnSuccessResponse_384() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_282() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_385() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_282, OnFailureCallback_282)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_385, OnFailureCallback_385)); return CHIP_NO_ERROR; } - void OnFailureResponse_282(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_385(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_282(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_385(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); - VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), - chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), -40)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_283() + CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_386() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableOctetStringArgument; - nullableOctetStringArgument.SetNull(); + chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument.SetNonNull() = 50; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_283, OnFailureCallback_283)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_386, OnFailureCallback_386)); return CHIP_NO_ERROR; } - void OnFailureResponse_283(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_386(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_283() { NextTest(); } + void OnSuccessResponse_386() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_284() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_387() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_284, OnFailureCallback_284)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_387, OnFailureCallback_387)); return CHIP_NO_ERROR; } - void OnFailureResponse_284(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_387(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_284(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_387(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNull("nullableOctetString", nullableOctetString)); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), 50)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_285() + CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_388() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableOctetStringArgument; - nullableOctetStringArgument.SetNonNull() = - chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument.SetNonNull() = 6; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_285, OnFailureCallback_285)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_388, OnFailureCallback_388)); return CHIP_NO_ERROR; } - void OnFailureResponse_285(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_388(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_285() { NextTest(); } + void OnSuccessResponse_388() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_286() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_389() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_286, OnFailureCallback_286)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_389, OnFailureCallback_389)); return CHIP_NO_ERROR; } - void OnFailureResponse_286(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_389(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_286(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_389(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { - VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); - VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), - chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), 6)); NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_287() + CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_390() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_287, OnFailureCallback_287)); + chip::app::DataModel::Nullable nullableRangeRestrictedInt8sArgument; + nullableRangeRestrictedInt8sArgument.SetNull(); + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt8sArgument, this, OnSuccessCallback_390, OnFailureCallback_390)); return CHIP_NO_ERROR; } - void OnFailureResponse_287(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_287(const chip::app::DataModel::Nullable & nullableCharString) - { - VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); - VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0))); + void OnFailureResponse_390(EmberAfStatus status) { ThrowFailureResponse(); } - NextTest(); - } + void OnSuccessResponse_390() { NextTest(); } - CHIP_ERROR TestWriteAttributeNullableCharString_288() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_391() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableCharStringArgument; - nullableCharStringArgument.SetNonNull() = chip::Span("☉T☉garbage: not in length on purpose", 7); - - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_288, OnFailureCallback_288)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_391, OnFailureCallback_391)); return CHIP_NO_ERROR; } - void OnFailureResponse_288(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_391(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_288() { NextTest(); } + void OnSuccessResponse_391(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) + { + VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); - CHIP_ERROR TestReadAttributeNullableCharString_289() + NextTest(); + } + + CHIP_ERROR TestReadNullableRangeRestrictedSigned16BitInteger_392() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_289, OnFailureCallback_289)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_392, OnFailureCallback_392)); return CHIP_NO_ERROR; } - void OnFailureResponse_289(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_392(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_289(const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_392(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); - VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("☉T☉", 7))); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), 0)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_290() + CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_393() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableCharStringArgument; - nullableCharStringArgument.SetNull(); + chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument.SetNonNull() = -32767; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_290, OnFailureCallback_290)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_393, OnFailureCallback_393)); return CHIP_NO_ERROR; } - void OnFailureResponse_290(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_393(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_290() { NextTest(); } + void OnSuccessResponse_393() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableCharString_291() + CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_394() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_291, OnFailureCallback_291)); + chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument.SetNonNull() = -151; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_394, OnFailureCallback_394)); return CHIP_NO_ERROR; } - void OnFailureResponse_291(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_291(const chip::app::DataModel::Nullable & nullableCharString) + void OnFailureResponse_394(EmberAfStatus status) { - VerifyOrReturn(CheckValueNull("nullableCharString", nullableCharString)); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_292() + void OnSuccessResponse_394() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_395() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableCharStringArgument; - nullableCharStringArgument.SetNonNull() = chip::Span("garbage: not in length on purpose", 0); + chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument.SetNonNull() = 201; - ReturnErrorOnFailure(cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_292, OnFailureCallback_292)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_395, OnFailureCallback_395)); return CHIP_NO_ERROR; } - void OnFailureResponse_292(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_395(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } - void OnSuccessResponse_292() { NextTest(); } + void OnSuccessResponse_395() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableCharString_293() + CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_396() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_293, OnFailureCallback_293)); + chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument.SetNonNull() = 32767; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_396, OnFailureCallback_396)); return CHIP_NO_ERROR; } - void OnFailureResponse_293(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_293(const chip::app::DataModel::Nullable & nullableCharString) + void OnFailureResponse_396(EmberAfStatus status) { - VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); - VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0))); - + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } - CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_294() + void OnSuccessResponse_396() { ThrowSuccessResponse(); } + + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_397() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 200; + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_294, OnFailureCallback_294)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_397, OnFailureCallback_397)); return CHIP_NO_ERROR; } - void OnFailureResponse_294(EmberAfStatus status) + void OnFailureResponse_397(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_397(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), 0)); + NextTest(); } - void OnSuccessResponse_294(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadAttributeFromNonexistentCluster_295() + CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_398() { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_295, OnFailureCallback_295)); + chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument.SetNonNull() = -150; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_398, OnFailureCallback_398)); return CHIP_NO_ERROR; } - void OnFailureResponse_295(EmberAfStatus status) - { - VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); - NextTest(); - } + void OnFailureResponse_398(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_295(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } + void OnSuccessResponse_398() { NextTest(); } - CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_296() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_399() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type; - - RequestType request; - - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_296(); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_296(status); - }; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_399, OnFailureCallback_399)); return CHIP_NO_ERROR; } - void OnFailureResponse_296(EmberAfStatus status) + void OnFailureResponse_399(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_399(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_VALUE)); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), -150)); + NextTest(); } - void OnSuccessResponse_296() { ThrowSuccessResponse(); } - - CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_297() + CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_400() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type; - - RequestType request; - request.arg1.Emplace() = 1; - - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_297(); - }; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_297(status); - }; + chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument.SetNonNull() = 200; - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_400, OnFailureCallback_400)); return CHIP_NO_ERROR; } - void OnFailureResponse_297(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_400(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_297() { NextTest(); } + void OnSuccessResponse_400() { NextTest(); } - CHIP_ERROR TestReportSubscribeToListAttribute_298() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_401() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - mTest_TestCluster_list_int8u_Reported = OnSuccessCallback_298; - return WaitForMs(0); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_401, OnFailureCallback_401)); + return CHIP_NO_ERROR; } - void OnFailureResponse_298(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_401(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_298(const chip::app::DataModel::DecodableList & listInt8u) + void OnSuccessResponse_401(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - mReceivedReport_298 = true; + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), 200)); - auto iter = listInt8u.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter.GetValue(), 1)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter.GetValue(), 2)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter.GetValue(), 3)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter.GetValue(), 4)); - VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter, 4)); + NextTest(); } - CHIP_ERROR TestSubscribeToListAttribute_299() + CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_402() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t minIntervalArgument; - minIntervalArgument = 2U; - uint16_t maxIntervalArgument; - maxIntervalArgument = 10U; + chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument.SetNonNull() = 7; - ReturnErrorOnFailure(cluster.SubscribeAttribute( - this, OnSuccessCallback_299, OnFailureCallback_299, minIntervalArgument, maxIntervalArgument, - OnSubscriptionEstablished_299)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_402, OnFailureCallback_402)); return CHIP_NO_ERROR; } - void OnFailureResponse_299(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_402(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_299(const chip::app::DataModel::DecodableList & value) + void OnSuccessResponse_402() { NextTest(); } + + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_403() { - if (mTest_TestCluster_list_int8u_Reported) - { - auto callback = mTest_TestCluster_list_int8u_Reported; - mTest_TestCluster_list_int8u_Reported = nullptr; - callback(this, value); - } + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_403, OnFailureCallback_403)); + return CHIP_NO_ERROR; } - void OnSubscriptionEstablishedResponse_299() + void OnFailureResponse_403(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_403(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - VerifyOrReturn(mReceivedReport_298, Exit("Initial report not received!")); + VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), 7)); + NextTest(); } - CHIP_ERROR TestWriteSubscribedToListAttribute_300() + CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_404() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::List listInt8uArgument; - - uint8_t listInt8uList[4]; - listInt8uList[0] = 5; - listInt8uList[1] = 6; - listInt8uList[2] = 7; - listInt8uList[3] = 8; - listInt8uArgument = listInt8uList; + chip::app::DataModel::Nullable nullableRangeRestrictedInt16sArgument; + nullableRangeRestrictedInt16sArgument.SetNull(); - ReturnErrorOnFailure(cluster.WriteAttribute( - listInt8uArgument, this, OnSuccessCallback_300, OnFailureCallback_300)); + ReturnErrorOnFailure( + cluster.WriteAttribute( + nullableRangeRestrictedInt16sArgument, this, OnSuccessCallback_404, OnFailureCallback_404)); return CHIP_NO_ERROR; } - void OnFailureResponse_300(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_404(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_300() { NextTest(); } + void OnSuccessResponse_404() { NextTest(); } - CHIP_ERROR TestCheckForListAttributeReport_301() + CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_405() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - mTest_TestCluster_list_int8u_Reported = OnSuccessCallback_301; + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_405, OnFailureCallback_405)); return CHIP_NO_ERROR; } - void OnFailureResponse_301(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_405(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_301(const chip::app::DataModel::DecodableList & listInt8u) + void OnSuccessResponse_405(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { - mReceivedReport_301 = true; - - auto iter = listInt8u.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter.GetValue(), 5)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter.GetValue(), 6)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter.GetValue(), 7)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter.GetValue(), 8)); - VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter, 4)); + VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); NextTest(); }