From 1223986b7ef86a1dbddf557ae63924c82965432c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 15 Nov 2021 13:09:13 -0500 Subject: [PATCH] Fix Darwin framework APIs to accept arbitrary types for command invokes (#11767) * Generate Objective-C types to represent Matter structs and command payloads. * Improve Objective-C to C++ value conversion to handle more cases. * Change Darwin cluster command invocations to take payload structs. * Update the Darwin tests to use the new command APIs. * Update return value decoding for commands on Darwin to use the new APIs. This also extends the return value handling, and the test comparison bits, to all types. * Enable a bunch of complex-types tests on Darwin. --- examples/chip-tool-darwin/main.m | 9 +- src/app/tests/suites/TestCluster.yaml | 445 ++ .../tests/suites/TestClusterComplexTypes.yaml | 465 +- .../Bindings/BindingsViewController.m | 20 +- .../Echo client/EchoViewController.m | 12 +- .../Fabric/FabricUIViewController.m | 5 +- .../OnOffCluster/OnOffViewController.m | 39 +- .../QRCode/QRCodeViewController.m | 38 +- .../Framework/CHIP.xcodeproj/project.pbxproj | 16 + src/darwin/Framework/CHIP/BUILD.gn | 4 + src/darwin/Framework/CHIP/CHIP.h | 2 + src/darwin/Framework/CHIP/CHIPClustersObjc.h | 1 + .../Framework/CHIP/CHIPCommandPayloadsObjc.h | 1 + src/darwin/Framework/CHIP/CHIPStructsObjc.h | 1 + .../templates/CHIPCallbackBridge-src.zapt | 2 + .../CHIP/templates/CHIPClustersObjc-src.zapt | 54 +- .../CHIP/templates/CHIPClustersObjc.zapt | 7 +- .../CHIPCommandPayloadsObjc-src.zapt | 11 + .../templates/CHIPCommandPayloadsObjc.zapt | 19 + .../CHIP/templates/CHIPStructsObjc-src.zapt | 11 + .../CHIP/templates/CHIPStructsObjc.zapt | 19 + .../CHIP/templates/clusters-tests.zapt | 4 +- src/darwin/Framework/CHIP/templates/helper.js | 56 +- .../partials/CHIPCallbackBridge.zapt | 19 +- .../templates/partials/check_test_value.zapt | 44 + .../templates/partials/decode_response.zapt | 15 - .../CHIP/templates/partials/decode_value.zapt | 40 + .../templates/partials/encode_command.zapt | 24 - .../CHIP/templates/partials/encode_value.zapt | 61 + .../CHIP/templates/partials/test_cluster.zapt | 42 +- .../CHIP/templates/partials/test_value.zapt | 34 + .../Framework/CHIP/templates/templates.json | 36 +- .../CHIP/zap-generated/CHIPCallbackBridge.mm | 1466 +++-- .../CHIP/zap-generated/CHIPClustersObjc.h | 625 +-- .../CHIP/zap-generated/CHIPClustersObjc.mm | 1791 ++++--- .../zap-generated/CHIPCommandPayloadsObjc.h | 1980 +++++++ .../zap-generated/CHIPCommandPayloadsObjc.mm | 1154 ++++ .../CHIP/zap-generated/CHIPStructsObjc.h | 335 ++ .../CHIP/zap-generated/CHIPStructsObjc.mm | 149 + .../Framework/CHIPTests/CHIPClustersTests.m | 4729 +++++++++++------ .../chip-tool/zap-generated/test/Commands.h | 3111 ++++++----- 41 files changed, 11580 insertions(+), 5316 deletions(-) create mode 120000 src/darwin/Framework/CHIP/CHIPClustersObjc.h create mode 120000 src/darwin/Framework/CHIP/CHIPCommandPayloadsObjc.h create mode 120000 src/darwin/Framework/CHIP/CHIPStructsObjc.h create mode 100644 src/darwin/Framework/CHIP/templates/CHIPCommandPayloadsObjc-src.zapt create mode 100644 src/darwin/Framework/CHIP/templates/CHIPCommandPayloadsObjc.zapt create mode 100644 src/darwin/Framework/CHIP/templates/CHIPStructsObjc-src.zapt create mode 100644 src/darwin/Framework/CHIP/templates/CHIPStructsObjc.zapt create mode 100644 src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt delete mode 100644 src/darwin/Framework/CHIP/templates/partials/decode_response.zapt create mode 100644 src/darwin/Framework/CHIP/templates/partials/decode_value.zapt delete mode 100644 src/darwin/Framework/CHIP/templates/partials/encode_command.zapt create mode 100644 src/darwin/Framework/CHIP/templates/partials/encode_value.zapt create mode 100644 src/darwin/Framework/CHIP/templates/partials/test_value.zapt create mode 100644 src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h create mode 100644 src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm create mode 100644 src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h create mode 100644 src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm diff --git a/examples/chip-tool-darwin/main.m b/examples/chip-tool-darwin/main.m index 19b9ccb6f2807b..9cd1af24d17fe4 100644 --- a/examples/chip-tool-darwin/main.m +++ b/examples/chip-tool-darwin/main.m @@ -16,14 +16,7 @@ * */ -#import -#import -#import -#import -#import -#import -#import -#import +#import #import int main(int argc, const char * argv[]) { return EXIT_SUCCESS; } diff --git a/src/app/tests/suites/TestCluster.yaml b/src/app/tests/suites/TestCluster.yaml index 020037d17b68e9..348459c7d855b1 100644 --- a/src/app/tests/suites/TestCluster.yaml +++ b/src/app/tests/suites/TestCluster.yaml @@ -859,3 +859,448 @@ tests: value: 20003 - name: "arg2" value: 101 + # Tests for Struct + + - label: "Send Test Command With Struct Argument and arg1.b is true" + command: "testStructArgumentRequest" + arguments: + values: + - name: "arg1" + value: + { + a: 0, + b: true, + c: 2, + d: "octet_string", + e: "char_string", + f: 1, + } + response: + values: + - name: "value" + value: true + + - label: "Send Test Command With Struct Argument and arg1.b is false" + command: "testStructArgumentRequest" + arguments: + values: + - name: "arg1" + value: + { + a: 0, + b: false, + c: 2, + d: "octet_string", + e: "char_string", + f: 1, + } + response: + values: + - name: "value" + value: false + + - label: + "Send Test Command With Nested Struct Argument and arg1.c.b is true" + disabled: true + command: "testNestedStructArgumentRequest" + arguments: + values: + - name: "arg1" + value: + { + a: 0, + b: true, + c: + { + a: 0, + b: true, + c: 2, + d: "octet_string", + e: "char_string", + f: 1, + }, + } + response: + values: + - name: "value" + value: true + + - label: "Send Test Command With Nested Struct Argument arg1.c.b is false" + disabled: true + command: "testNestedStructArgumentRequest" + arguments: + values: + - name: "arg1" + value: + { + a: 0, + b: true, + c: + { + a: 0, + b: false, + c: 2, + d: "octet_string", + e: "char_string", + f: 1, + }, + } + response: + values: + - name: "value" + value: false + + - label: + "Send Test Command With Nested Struct List Argument and all fields b + of arg1.d are true" + disabled: true + command: "testNestedStructListArgumentRequest" + arguments: + values: + - name: "arg1" + value: + { + a: 0, + b: true, + c: + { + a: 0, + b: true, + c: 2, + d: "octet_string", + e: "char_string", + f: 1, + }, + d: + [ + { + a: 1, + b: true, + c: 3, + d: "nested_octet_string", + e: "nested_char_string", + f: 1, + }, + { + a: 2, + b: true, + c: 3, + d: "nested_octet_string", + e: "nested_char_string", + f: 1, + }, + ], + e: [1, 2, 3], + f: + [ + "octet_string_1", + "octect_string_2", + "octet_string_3", + ], + g: [0, 255], + } + response: + values: + - name: "value" + value: false + + - label: + "Send Test Command With Nested Struct List Argument and some fields b + of arg1.d are false" + disabled: true + command: "testNestedStructListArgumentRequest" + arguments: + values: + - name: "arg1" + value: + { + a: 0, + b: true, + c: + { + a: 0, + b: true, + c: 2, + d: "octet_string", + e: "char_string", + f: 1, + }, + d: + [ + { + a: 1, + b: true, + c: 3, + d: "nested_octet_string", + e: "nested_char_string", + f: 1, + }, + { + a: 2, + b: false, + c: 3, + d: "nested_octet_string", + e: "nested_char_string", + f: 1, + }, + ], + e: [1, 2, 3], + f: + [ + "octet_string_1", + "octect_string_2", + "octet_string_3", + ], + g: [0, 255], + } + response: + values: + - name: "value" + value: false + + # Tests for List + + - label: "Send Test Command With List of INT8U and none of them is set to 0" + command: "testListInt8UArgumentRequest" + arguments: + values: + - name: "arg1" + value: [1, 2, 3, 4, 5, 6, 7, 8, 9] + response: + values: + - name: "value" + value: true + + - label: "Send Test Command With List of INT8U and one of them is set to 0" + command: "testListInt8UArgumentRequest" + arguments: + values: + - name: "arg1" + value: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] + response: + values: + - name: "value" + value: false + + - label: "Send Test Command With List of INT8U and get it reversed" + command: "testListInt8UReverseRequest" + arguments: + values: + - name: "arg1" + value: [1, 2, 3, 4, 5, 6, 7, 8, 9] + response: + values: + - name: "arg1" + value: [9, 8, 7, 6, 5, 4, 3, 2, 1] + + - label: + "Send Test Command With empty List of INT8U and get an empty list back" + command: "testListInt8UReverseRequest" + arguments: + values: + - name: "arg1" + value: [] + response: + values: + - name: "arg1" + value: [] + + - label: + "Send Test Command With List of Struct Argument and arg1.b of first + item is true" + command: "testListStructArgumentRequest" + arguments: + values: + - name: "arg1" + value: + [ + { + a: 0, + b: true, + c: 2, + d: "first_octet_string", + e: "first_char_string", + f: 1, + }, + { + a: 1, + b: true, + c: 3, + d: "second_octet_string", + e: "second_char_string", + f: 1, + }, + ] + response: + values: + - name: "value" + value: true + + - label: + "Send Test Command With List of Struct Argument and arg1.b of first + item is false" + command: "testListStructArgumentRequest" + arguments: + values: + - name: "arg1" + value: + [ + { + a: 1, + b: true, + c: 3, + d: "second_octet_string", + e: "second_char_string", + f: 1, + }, + { + a: 0, + b: false, + c: 2, + d: "first_octet_string", + e: "first_char_string", + f: 1, + }, + ] + response: + values: + - name: "value" + value: false + + - label: + "Send Test Command With List of Nested Struct List Argument and all + fields b of elements of arg1.d are true" + disabled: true + command: "testListNestedStructListArgumentRequest" + arguments: + values: + - name: "arg1" + value: + [ + { + a: 0, + b: true, + c: + { + a: 0, + b: true, + c: 2, + d: "octet_string", + e: "char_string", + f: 1, + }, + d: + [ + { + a: 1, + b: true, + c: 3, + d: "nested_octet_string", + e: "nested_char_string", + f: 1, + }, + { + a: 2, + b: true, + c: 3, + d: "nested_octet_string", + e: "nested_char_string", + f: 1, + }, + ], + e: [1, 2, 3], + f: + [ + "octet_string_1", + "octect_string_2", + "octet_string_3", + ], + g: [0, 255], + }, + ] + response: + values: + - name: "value" + value: true + + - label: + "Send Test Command With Nested Struct List Argument and some fields b + of elements of arg1.d are false" + disabled: true + command: "testListNestedStructListArgumentRequest" + arguments: + values: + - name: "arg1" + value: + [ + { + a: 0, + b: true, + c: + { + a: 0, + b: true, + c: 2, + d: "octet_string", + e: "char_string", + f: 1, + }, + d: + [ + { + a: 1, + b: true, + c: 3, + d: "nested_octet_string", + e: "nested_char_string", + f: 1, + }, + { + a: 2, + b: false, + c: 3, + d: "nested_octet_string", + e: "nested_char_string", + f: 1, + }, + ], + e: [1, 2, 3], + f: + [ + "octet_string_1", + "octect_string_2", + "octet_string_3", + ], + g: [0, 255], + }, + ] + response: + values: + - name: "value" + value: false + + # Tests for Nullables and Optionals + + - label: "Send Test Command with optional arg set." + command: "testNullableOptionalRequest" + arguments: + values: + - name: "arg1" + value: 5 + response: + values: + - name: "wasPresent" + value: true + - name: "wasNull" + value: false + - name: "value" + value: 5 + - name: "originalValue" + value: 5 + + - label: "Send Test Command without its optional arg." + command: "testNullableOptionalRequest" + response: + values: + - name: "wasPresent" + value: false diff --git a/src/app/tests/suites/TestClusterComplexTypes.yaml b/src/app/tests/suites/TestClusterComplexTypes.yaml index cc0312c49e67a6..f1d0025e735c4d 100644 --- a/src/app/tests/suites/TestClusterComplexTypes.yaml +++ b/src/app/tests/suites/TestClusterComplexTypes.yaml @@ -19,425 +19,25 @@ config: endpoint: 1 tests: - # Tests for Struct - - - label: "Send Test Command With Struct Argument and arg1.b is true" - command: "testStructArgumentRequest" - arguments: - values: - - name: "arg1" - value: - { - a: 0, - b: true, - c: 2, - d: "octet_string", - e: "char_string", - f: 1, - } - response: - values: - - name: "value" - value: true - - - label: "Send Test Command With Struct Argument and arg1.b is false" - command: "testStructArgumentRequest" - arguments: - values: - - name: "arg1" - value: - { - a: 0, - b: false, - c: 2, - d: "octet_string", - e: "char_string", - f: 1, - } - response: - values: - - name: "value" - value: false - - - label: - "Send Test Command With Nested Struct Argument and arg1.c.b is true" - disabled: true - command: "testNestedStructArgumentRequest" - arguments: - values: - - name: "arg1" - value: - { - a: 0, - b: true, - c: - { - a: 0, - b: true, - c: 2, - d: "octet_string", - e: "char_string", - f: 1, - }, - } - response: - values: - - name: "value" - value: true - - - label: "Send Test Command With Nested Struct Argument arg1.c.b is false" - disabled: true - command: "testNestedStructArgumentRequest" - arguments: - values: - - name: "arg1" - value: - { - a: 0, - b: true, - c: - { - a: 0, - b: false, - c: 2, - d: "octet_string", - e: "char_string", - f: 1, - }, - } - response: - values: - - name: "value" - value: false - - - label: - "Send Test Command With Nested Struct List Argument and all fields b - of arg1.d are true" - disabled: true - command: "testNestedStructListArgumentRequest" - arguments: - values: - - name: "arg1" - value: - { - a: 0, - b: true, - c: - { - a: 0, - b: true, - c: 2, - d: "octet_string", - e: "char_string", - f: 1, - }, - d: - [ - { - a: 1, - b: true, - c: 3, - d: "nested_octet_string", - e: "nested_char_string", - f: 1, - }, - { - a: 2, - b: true, - c: 3, - d: "nested_octet_string", - e: "nested_char_string", - f: 1, - }, - ], - e: [1, 2, 3], - f: - [ - "octet_string_1", - "octect_string_2", - "octet_string_3", - ], - g: [0, 255], - } - response: - values: - - name: "value" - value: false - - - label: - "Send Test Command With Nested Struct List Argument and some fields b - of arg1.d are false" - disabled: true - command: "testNestedStructListArgumentRequest" - arguments: - values: - - name: "arg1" - value: - { - a: 0, - b: true, - c: - { - a: 0, - b: true, - c: 2, - d: "octet_string", - e: "char_string", - f: 1, - }, - d: - [ - { - a: 1, - b: true, - c: 3, - d: "nested_octet_string", - e: "nested_char_string", - f: 1, - }, - { - a: 2, - b: false, - c: 3, - d: "nested_octet_string", - e: "nested_char_string", - f: 1, - }, - ], - e: [1, 2, 3], - f: - [ - "octet_string_1", - "octect_string_2", - "octet_string_3", - ], - g: [0, 255], - } - response: - values: - - name: "value" - value: false - - # Tests for List - - - label: "Send Test Command With List of INT8U and none of them is set to 0" - command: "testListInt8UArgumentRequest" - arguments: - values: - - name: "arg1" - value: [1, 2, 3, 4, 5, 6, 7, 8, 9] - response: - values: - - name: "value" - value: true - - - label: "Send Test Command With List of INT8U and one of them is set to 0" - command: "testListInt8UArgumentRequest" - arguments: - values: - - name: "arg1" - value: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] - response: - values: - - name: "value" - value: false - - - label: "Send Test Command With List of INT8U and get it reversed" - command: "testListInt8UReverseRequest" - arguments: - values: - - name: "arg1" - value: [1, 2, 3, 4, 5, 6, 7, 8, 9] - response: - values: - - name: "arg1" - value: [9, 8, 7, 6, 5, 4, 3, 2, 1] - - - label: - "Send Test Command With empty List of INT8U and get an empty list back" - command: "testListInt8UReverseRequest" - arguments: - values: - - name: "arg1" - value: [] - response: - values: - - name: "arg1" - value: [] - - - label: - "Send Test Command With List of Struct Argument and arg1.b of first - item is true" - command: "testListStructArgumentRequest" + - label: "Send Test Command with optional arg set to null." + # Not in TestCluster.yaml for now because this test depends on + # distinguishing "null" and "not sent" for a nullable+optional + # field and some of the TestCluster consumers don't do + # that... and it's not clear that it's ever needed outside of + # tests. + command: "testNullableOptionalRequest" arguments: values: - name: "arg1" - value: - [ - { - a: 0, - b: true, - c: 2, - d: "first_octet_string", - e: "first_char_string", - f: 1, - }, - { - a: 1, - b: true, - c: 3, - d: "second_octet_string", - e: "second_char_string", - f: 1, - }, - ] + value: null response: values: - - name: "value" + - name: "wasPresent" value: true - - - label: - "Send Test Command With List of Struct Argument and arg1.b of first - item is false" - command: "testListStructArgumentRequest" - arguments: - values: - - name: "arg1" - value: - [ - { - a: 1, - b: true, - c: 3, - d: "second_octet_string", - e: "second_char_string", - f: 1, - }, - { - a: 0, - b: false, - c: 2, - d: "first_octet_string", - e: "first_char_string", - f: 1, - }, - ] - response: - values: - - name: "value" - value: false - - - label: - "Send Test Command With List of Nested Struct List Argument and all - fields b of elements of arg1.d are true" - disabled: true - command: "testListNestedStructListArgumentRequest" - arguments: - values: - - name: "arg1" - value: - [ - { - a: 0, - b: true, - c: - { - a: 0, - b: true, - c: 2, - d: "octet_string", - e: "char_string", - f: 1, - }, - d: - [ - { - a: 1, - b: true, - c: 3, - d: "nested_octet_string", - e: "nested_char_string", - f: 1, - }, - { - a: 2, - b: true, - c: 3, - d: "nested_octet_string", - e: "nested_char_string", - f: 1, - }, - ], - e: [1, 2, 3], - f: - [ - "octet_string_1", - "octect_string_2", - "octet_string_3", - ], - g: [0, 255], - }, - ] - response: - values: - - name: "value" + - name: "wasNull" value: true - - - label: - "Send Test Command With Nested Struct List Argument and some fields b - of elements of arg1.d are false" - disabled: true - command: "testListNestedStructListArgumentRequest" - arguments: - values: - - name: "arg1" - value: - [ - { - a: 0, - b: true, - c: - { - a: 0, - b: true, - c: 2, - d: "octet_string", - e: "char_string", - f: 1, - }, - d: - [ - { - a: 1, - b: true, - c: 3, - d: "nested_octet_string", - e: "nested_char_string", - f: 1, - }, - { - a: 2, - b: false, - c: 3, - d: "nested_octet_string", - e: "nested_char_string", - f: 1, - }, - ], - e: [1, 2, 3], - f: - [ - "octet_string_1", - "octect_string_2", - "octet_string_3", - ], - g: [0, 255], - }, - ] - response: - values: - - name: "value" - value: false + - name: "originalValue" + value: null - label: "Write attribute LIST With List of INT8U and none of them is set to 0" @@ -488,47 +88,6 @@ tests: { fabricIndex: 3, operationalCert: "Test3" }, ] - # Tests for Nullables and Optionals - - - label: "Send Test Command with optional arg set." - command: "testNullableOptionalRequest" - arguments: - values: - - name: "arg1" - value: 5 - response: - values: - - name: "wasPresent" - value: true - - name: "wasNull" - value: false - - name: "value" - value: 5 - - name: "originalValue" - value: 5 - - - label: "Send Test Command without its optional arg." - command: "testNullableOptionalRequest" - response: - values: - - name: "wasPresent" - value: false - - - label: "Send Test Command with optional arg set to null." - command: "testNullableOptionalRequest" - arguments: - values: - - name: "arg1" - value: null - response: - values: - - name: "wasPresent" - value: true - - name: "wasNull" - value: true - - name: "originalValue" - value: null - # Nullable attributes # Tests for nullable Boolean attribute diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m index 0b520bb90b808e..4212a72bd67b10 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m @@ -139,10 +139,12 @@ - (IBAction)bind:(id)sender if (CHIPGetConnectedDevice(^(CHIPDevice * _Nullable chipDevice, NSError * _Nullable error) { if (chipDevice) { CHIPBinding * cluster = [[CHIPBinding alloc] initWithDevice:chipDevice endpoint:0 queue:dispatch_get_main_queue()]; - [cluster bind:nodeId - groupId:groupId - endpointId:endpointId - clusterId:clusterId + __auto_type * payload = [[CHIPBindingClusterBindPayload alloc] init]; + payload.NodeId = @(nodeId); + payload.GroupId = @(groupId); + payload.EndpointId = @(endpointId); + payload.ClusterId = @(clusterId); + [cluster bind:payload responseHandler:^(NSError * _Nullable error, NSDictionary * _Nullable values) { NSString * resultString = (error == nil) ? @"Bind command: success!" @@ -169,10 +171,12 @@ - (IBAction)unbind:(id)sender if (CHIPGetConnectedDevice(^(CHIPDevice * _Nullable chipDevice, NSError * _Nullable error) { if (chipDevice) { CHIPBinding * cluster = [[CHIPBinding alloc] initWithDevice:chipDevice endpoint:0 queue:dispatch_get_main_queue()]; - [cluster unbind:nodeId - groupId:groupId - endpointId:endpointId - clusterId:clusterId + __auto_type * payload = [[CHIPBindingClusterUnbindPayload alloc] init]; + payload.NodeId = @(nodeId); + payload.GroupId = @(groupId); + payload.EndpointId = @(endpointId); + payload.ClusterId = @(clusterId); + [cluster unbind:payload responseHandler:^(NSError * _Nullable error, NSDictionary * _Nullable values) { NSString * resultString = (error == nil) ? @"Unbind command: success!" diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Echo client/EchoViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Echo client/EchoViewController.m index ea686121d2cbb0..f9461ba4511d9e 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Echo client/EchoViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Echo client/EchoViewController.m @@ -116,11 +116,13 @@ - (IBAction)sendMessage:(id)sender CHIPBasic * cluster = [[CHIPBasic alloc] initWithDevice:chipDevice endpoint:0 queue:dispatch_get_main_queue()]; [self updateResult:@"MfgSpecificPing command sent..."]; - [cluster mfgSpecificPing:^(NSError * error, NSDictionary * values) { - NSString * resultString = (error == nil) ? @"MfgSpecificPing command: success!" - : [NSString stringWithFormat:@"An error occured: 0x%02lx", error.code]; - [self updateResult:resultString]; - }]; + [cluster mfgSpecificPing:[[CHIPBasicClusterMfgSpecificPingPayload alloc] init] + responseHandler:^(NSError * error, NSDictionary * values) { + NSString * resultString = (error == nil) + ? @"MfgSpecificPing command: success!" + : [NSString stringWithFormat:@"An error occured: 0x%02lx", error.code]; + [self updateResult:resultString]; + }]; } else { [self updateResult:@"Failed to establish a connection with the device"]; } diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m index a6539db865ec6c..5ca79e28e27438 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m @@ -348,8 +348,11 @@ - (IBAction)updateFabricLabelButtonPressed:(id)sender CHIPOperationalCredentials * cluster = [[CHIPOperationalCredentials alloc] initWithDevice:chipDevice endpoint:0 queue:dispatch_get_main_queue()]; [self updateResult:[NSString stringWithFormat:@"updateFabricLabel command sent."] isError:NO]; + __auto_type * payload = [[CHIPOperationalCredentialsClusterUpdateFabricLabelPayload alloc] init]; + payload.Label = label; + [cluster - updateFabricLabel:label + updateFabricLabel:payload responseHandler:^(NSError * _Nullable error, NSDictionary * _Nullable values) { dispatch_async(dispatch_get_main_queue(), ^{ if (error) { diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/OnOffCluster/OnOffViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/OnOffCluster/OnOffViewController.m index 563366149759f8..bd336b579f6e94 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/OnOffCluster/OnOffViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/OnOffCluster/OnOffViewController.m @@ -242,12 +242,13 @@ - (IBAction)onButtonTapped:(id)sender CHIPOnOff * onOff = [[CHIPOnOff alloc] initWithDevice:chipDevice endpoint:endpoint queue:dispatch_get_main_queue()]; - [onOff on:^(NSError * error, NSDictionary * values) { - NSString * resultString = (error != nil) - ? [NSString stringWithFormat:@"An error occured: 0x%02lx", error.code] - : @"On command success"; - [self updateResult:resultString]; - }]; + [onOff on:[[CHIPOnOffClusterOnPayload alloc] init] + responseHandler:^(NSError * error, NSDictionary * values) { + NSString * resultString = (error != nil) + ? [NSString stringWithFormat:@"An error occured: 0x%02lx", error.code] + : @"On command success"; + [self updateResult:resultString]; + }]; } else { [self updateResult:[NSString stringWithFormat:@"Failed to establish a connection with the device"]]; } @@ -271,12 +272,13 @@ - (IBAction)offButtonTapped:(id)sender CHIPOnOff * onOff = [[CHIPOnOff alloc] initWithDevice:chipDevice endpoint:endpoint queue:dispatch_get_main_queue()]; - [onOff off:^(NSError * error, NSDictionary * values) { - NSString * resultString = (error != nil) - ? [NSString stringWithFormat:@"An error occured: 0x%02lx", error.code] - : @"Off command success"; - [self updateResult:resultString]; - }]; + [onOff off:[[CHIPOnOffClusterOffPayload alloc] init] + responseHandler:^(NSError * error, NSDictionary * values) { + NSString * resultString = (error != nil) + ? [NSString stringWithFormat:@"An error occured: 0x%02lx", error.code] + : @"Off command success"; + [self updateResult:resultString]; + }]; } else { [self updateResult:[NSString stringWithFormat:@"Failed to establish a connection with the device"]]; } @@ -300,12 +302,13 @@ - (IBAction)toggleButtonTapped:(id)sender CHIPOnOff * onOff = [[CHIPOnOff alloc] initWithDevice:chipDevice endpoint:endpoint queue:dispatch_get_main_queue()]; - [onOff toggle:^(NSError * error, NSDictionary * values) { - NSString * resultString = (error != nil) - ? [NSString stringWithFormat:@"An error occured: 0x%02lx", error.code] - : @"Toggle command success"; - [self updateResult:resultString]; - }]; + [onOff toggle:[[CHIPOnOffClusterTogglePayload alloc] init] + responseHandler:^(NSError * error, NSDictionary * values) { + NSString * resultString = (error != nil) + ? [NSString stringWithFormat:@"An error occured: 0x%02lx", error.code] + : @"Toggle command success"; + [self updateResult:resultString]; + }]; } else { [self updateResult:[NSString stringWithFormat:@"Failed to establish a connection with the device"]]; } diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m index 7076e99429e92b..799083c7055a8d 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m @@ -541,16 +541,14 @@ - (void)addWiFiNetwork:(NSString *)ssid password:(NSString *)password self.cluster = [[CHIPNetworkCommissioning alloc] initWithDevice:chipDevice endpoint:0 queue:dispatch_get_main_queue()]; - NSData * networkId = [ssid dataUsingEncoding:NSUTF8StringEncoding]; - NSData * credentials = [password dataUsingEncoding:NSUTF8StringEncoding]; - uint64_t breadcrumb = 0; - uint32_t timeoutMs = 3000; + __auto_type * payload = [[CHIPNetworkCommissioningClusterAddWiFiNetworkPayload alloc] init]; + payload.Ssid = [ssid dataUsingEncoding:NSUTF8StringEncoding]; + payload.Credentials = [password dataUsingEncoding:NSUTF8StringEncoding]; + payload.Breadcrumb = @(0); + payload.TimeoutMs = @(3000); __weak typeof(self) weakSelf = self; - [self->_cluster addWiFiNetwork:networkId - credentials:credentials - breadcrumb:breadcrumb - timeoutMs:timeoutMs + [self->_cluster addWiFiNetwork:payload responseHandler:^(NSError * error, NSDictionary * values) { [weakSelf onAddNetworkResponse:error isWiFi:YES]; }]; @@ -571,13 +569,13 @@ - (void)addThreadNetwork:(NSData *)threadDataSet self.cluster = [[CHIPNetworkCommissioning alloc] initWithDevice:chipDevice endpoint:0 queue:dispatch_get_main_queue()]; - uint64_t breadcrumb = 0; - uint32_t timeoutMs = 3000; + __auto_type * payload = [[CHIPNetworkCommissioningClusterAddThreadNetworkPayload alloc] init]; + payload.OperationalDataset = threadDataSet; + payload.Breadcrumb = @(0); + payload.TimeoutMs = @(3000); __weak typeof(self) weakSelf = self; - [self->_cluster addThreadNetwork:threadDataSet - breadcrumb:breadcrumb - timeoutMs:timeoutMs + [self->_cluster addThreadNetwork:payload responseHandler:^(NSError * error, NSDictionary * values) { [weakSelf onAddNetworkResponse:error isWiFi:NO]; }]; @@ -598,21 +596,19 @@ - (void)onAddNetworkResponse:(NSError *)error isWiFi:(BOOL)isWiFi return; } - NSData * networkId; + __auto_type * payload = [[CHIPNetworkCommissioningClusterEnableNetworkPayload alloc] init]; if (isWiFi) { NSString * ssid = CHIPGetDomainValueForKey(kCHIPToolDefaultsDomain, kNetworkSSIDDefaultsKey); - networkId = [ssid dataUsingEncoding:NSUTF8StringEncoding]; + payload.NetworkID = [ssid dataUsingEncoding:NSUTF8StringEncoding]; } else { uint8_t tempThreadNetworkId[] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }; - networkId = [NSData dataWithBytes:tempThreadNetworkId length:sizeof(tempThreadNetworkId)]; + payload.NetworkID = [NSData dataWithBytes:tempThreadNetworkId length:sizeof(tempThreadNetworkId)]; } - uint64_t breadcrumb = 0; - uint32_t timeoutMs = 3000; + payload.Breadcrumb = @(0); + payload.TimeoutMs = @(3000); __weak typeof(self) weakSelf = self; - [_cluster enableNetwork:networkId - breadcrumb:breadcrumb - timeoutMs:timeoutMs + [_cluster enableNetwork:payload responseHandler:^(NSError * err, NSDictionary * values) { [weakSelf onEnableNetworkResponse:err]; }]; diff --git a/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj b/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj index e3415b970cc8fd..400307bcf1f726 100644 --- a/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj @@ -55,6 +55,10 @@ 2F79A67726CE6672006377B0 /* im-client-callbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2F79A67626CE6672006377B0 /* im-client-callbacks.cpp */; }; 2FD775552695557E00FF4B12 /* error-mapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FD775542695557E00FF4B12 /* error-mapping.cpp */; }; 5129BCFD26A9EE3300122DDF /* CHIPError.h in Headers */ = {isa = PBXBuildFile; fileRef = 5129BCFC26A9EE3300122DDF /* CHIPError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 51B22C1E2740CB0A008D5055 /* CHIPStructsObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B22C1D2740CB0A008D5055 /* CHIPStructsObjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 51B22C222740CB1D008D5055 /* CHIPCommandPayloadsObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B22C212740CB1D008D5055 /* CHIPCommandPayloadsObjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 51B22C262740CB32008D5055 /* CHIPStructsObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B22C252740CB32008D5055 /* CHIPStructsObjc.mm */; }; + 51B22C2A2740CB47008D5055 /* CHIPCommandPayloadsObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B22C292740CB47008D5055 /* CHIPCommandPayloadsObjc.mm */; }; 991DC0842475F45400C13860 /* CHIPDeviceController.h in Headers */ = {isa = PBXBuildFile; fileRef = 991DC0822475F45400C13860 /* CHIPDeviceController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 991DC0892475F47D00C13860 /* CHIPDeviceController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 991DC0872475F47D00C13860 /* CHIPDeviceController.mm */; }; 991DC08B247704DC00C13860 /* CHIPLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 991DC08A247704DC00C13860 /* CHIPLogging.h */; }; @@ -141,6 +145,10 @@ 2F79A67626CE6672006377B0 /* im-client-callbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "im-client-callbacks.cpp"; path = "../../../app/util/im-client-callbacks.cpp"; sourceTree = ""; }; 2FD775542695557E00FF4B12 /* error-mapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "error-mapping.cpp"; path = "../../../app/util/error-mapping.cpp"; sourceTree = ""; }; 5129BCFC26A9EE3300122DDF /* CHIPError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CHIPError.h; path = CHIP/CHIPError.h; sourceTree = ""; }; + 51B22C1D2740CB0A008D5055 /* CHIPStructsObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CHIPStructsObjc.h; path = "zap-generated/CHIPStructsObjc.h"; sourceTree = ""; }; + 51B22C212740CB1D008D5055 /* CHIPCommandPayloadsObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CHIPCommandPayloadsObjc.h; path = "zap-generated/CHIPCommandPayloadsObjc.h"; sourceTree = ""; }; + 51B22C252740CB32008D5055 /* CHIPStructsObjc.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CHIPStructsObjc.mm; path = "zap-generated/CHIPStructsObjc.mm"; sourceTree = ""; }; + 51B22C292740CB47008D5055 /* CHIPCommandPayloadsObjc.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CHIPCommandPayloadsObjc.mm; path = "zap-generated/CHIPCommandPayloadsObjc.mm"; sourceTree = ""; }; 991DC0822475F45400C13860 /* CHIPDeviceController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHIPDeviceController.h; sourceTree = ""; }; 991DC0872475F47D00C13860 /* CHIPDeviceController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CHIPDeviceController.mm; sourceTree = ""; }; 991DC08A247704DC00C13860 /* CHIPLogging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHIPLogging.h; sourceTree = ""; }; @@ -222,6 +230,10 @@ 1EC4CE5825CC26AB00D7304F /* CHIPGeneratedFiles */ = { isa = PBXGroup; children = ( + 51B22C292740CB47008D5055 /* CHIPCommandPayloadsObjc.mm */, + 51B22C252740CB32008D5055 /* CHIPStructsObjc.mm */, + 51B22C212740CB1D008D5055 /* CHIPCommandPayloadsObjc.h */, + 51B22C1D2740CB0A008D5055 /* CHIPStructsObjc.h */, 1EC3238C271999E2002A8BF0 /* cluster-objects.cpp */, 1E16A8F926B9835600683C53 /* CHIPTestClustersObjc.h */, 1E16A8FA26B9835700683C53 /* CHIPTestClustersObjc.mm */, @@ -331,6 +343,8 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 51B22C222740CB1D008D5055 /* CHIPCommandPayloadsObjc.h in Headers */, + 51B22C1E2740CB0A008D5055 /* CHIPStructsObjc.h in Headers */, 2CB7163B252E8A7B0026E2BB /* CHIPDevicePairingDelegateBridge.h in Headers */, 1E16A90326B98AF100683C53 /* CHIPTestClustersObjc.h in Headers */, 2C1B027B2641DB4E00780EF1 /* CHIPOperationalCredentialsDelegate.h in Headers */, @@ -486,8 +500,10 @@ 1E85730E265519AE0050A4D9 /* CHIPClusters.cpp in Sources */, 1E16A90226B98AB700683C53 /* CHIPTestClustersObjc.mm in Sources */, 1E85732326551A490050A4D9 /* process-global-message.cpp in Sources */, + 51B22C2A2740CB47008D5055 /* CHIPCommandPayloadsObjc.mm in Sources */, 1E85732E26551A490050A4D9 /* ember-print.cpp in Sources */, 2C5EEEF7268A85C400CAE3D3 /* CHIPDeviceConnectionBridge.mm in Sources */, + 51B22C262740CB32008D5055 /* CHIPStructsObjc.mm in Sources */, 2C222AD1255C620600E446B9 /* CHIPDevice.mm in Sources */, 1EC3238D271999E2002A8BF0 /* cluster-objects.cpp in Sources */, 1E857306265519720050A4D9 /* CHIPClientCallbacks.cpp in Sources */, diff --git a/src/darwin/Framework/CHIP/BUILD.gn b/src/darwin/Framework/CHIP/BUILD.gn index d0ebe853cc10a2..aaf7391abf6698 100644 --- a/src/darwin/Framework/CHIP/BUILD.gn +++ b/src/darwin/Framework/CHIP/BUILD.gn @@ -54,6 +54,10 @@ static_library("framework") { "CHIPSetupPayload.mm", "zap-generated/CHIPClustersObjc.h", "zap-generated/CHIPClustersObjc.mm", + "zap-generated/CHIPCommandPayloadsObjc.h", + "zap-generated/CHIPCommandPayloadsObjc.mm", + "zap-generated/CHIPStructsObjc.h", + "zap-generated/CHIPStructsObjc.mm", ] public_deps = [ diff --git a/src/darwin/Framework/CHIP/CHIP.h b/src/darwin/Framework/CHIP/CHIP.h index 9e3621c8b4a56d..376ec2193a5a77 100644 --- a/src/darwin/Framework/CHIP/CHIP.h +++ b/src/darwin/Framework/CHIP/CHIP.h @@ -18,6 +18,7 @@ // pull together CHIP headers #import #import +#import #import #import #import @@ -27,6 +28,7 @@ #import #import #import +#import #import #import diff --git a/src/darwin/Framework/CHIP/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/CHIPClustersObjc.h new file mode 120000 index 00000000000000..e67ba31104d431 --- /dev/null +++ b/src/darwin/Framework/CHIP/CHIPClustersObjc.h @@ -0,0 +1 @@ +zap-generated/CHIPClustersObjc.h \ No newline at end of file diff --git a/src/darwin/Framework/CHIP/CHIPCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/CHIPCommandPayloadsObjc.h new file mode 120000 index 00000000000000..9e7cd4e7e32b49 --- /dev/null +++ b/src/darwin/Framework/CHIP/CHIPCommandPayloadsObjc.h @@ -0,0 +1 @@ +zap-generated/CHIPCommandPayloadsObjc.h \ No newline at end of file diff --git a/src/darwin/Framework/CHIP/CHIPStructsObjc.h b/src/darwin/Framework/CHIP/CHIPStructsObjc.h new file mode 120000 index 00000000000000..6f9908655c891e --- /dev/null +++ b/src/darwin/Framework/CHIP/CHIPStructsObjc.h @@ -0,0 +1 @@ +zap-generated/CHIPStructsObjc.h \ No newline at end of file diff --git a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt index 9fb004fa2a1dcb..1041a1b2e6838f 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt @@ -2,6 +2,8 @@ {{#if (chip_has_client_clusters)}} #import "CHIPCallbackBridge_internal.h" +#import "CHIPStructsObjc.h" +#import "CHIPCommandPayloadsObjc.h" {{#>CHIPCallbackBridge partial-type="" }}DefaultSuccessCallback{{/CHIPCallbackBridge}} {{#>CHIPCallbackBridge partial-type="Octet_String"}}OctetStringAttributeCallback{{/CHIPCallbackBridge}} diff --git a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt index 1d606f237aaf53..3be2bb908b32c2 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt @@ -8,11 +8,53 @@ #import "CHIPClustersObjc_internal.h" #import "CHIPDevice.h" #import "CHIPDevice_Internal.h" +#import "CHIPStructsObjc.h" +#import "CHIPCommandPayloadsObjc.h" + +#include +#include using chip::Callback::Callback; using chip::Callback::Cancelable; using namespace chip::app::Clusters; +template struct ListMemberTypeGetter {}; +template struct ListMemberTypeGetter> { + // We use List in data model data structures, so consumers can + // use const data. Just grab the type with the const stripped off. + using Type = std::remove_const_t; +}; + +struct ListHolderBase { + // Just here so we can delete an instance to trigger the subclass destructor. + virtual ~ListHolderBase() {} +}; + +template +struct ListHolder : ListHolderBase { + ListHolder(size_t N) { + mList = new T[N]; + } + ~ListHolder() { + delete [] mList; + } + T * mList; +}; + +struct ListFreer { + ~ListFreer() { + for (auto listHolder : mListHolders) { + delete listHolder; + } + } + + void add(ListHolderBase * listHolder) { + mListHolders.insert(listHolder); + } + + std::set mListHolders; +}; + {{#chip_client_clusters}} @implementation CHIP{{asUpperCamelCase name}} @@ -23,13 +65,13 @@ using namespace chip::app::Clusters; {{#chip_cluster_commands}} {{#*inline "callbackName"}}{{#if hasSpecificResponse}}{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase responseName}}{{else}}DefaultSuccess{{/if}}{{/inline}} -{{#if (zcl_command_arguments_count this.id)}} -- (void){{asLowerCamelCase name}}:{{#chip_cluster_command_arguments_with_structs_expanded}}{{#not_first}}{{asLowerCamelCase label}}:{{/not_first}}({{asObjectiveCBasicType type}}){{asLowerCamelCase label}} {{/chip_cluster_command_arguments_with_structs_expanded}}responseHandler:(ResponseHandler)responseHandler -{{else}} -- (void){{asLowerCamelCase name}}:(ResponseHandler)responseHandler -{{/if}} +- (void){{asLowerCamelCase name}}:(CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Payload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { - {{>encode_command}} + ListFreer listFreer; + {{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Type request; + {{#chip_cluster_command_arguments}} + {{>encode_value target=(concat "request." (asLowerCamelCase label)) source=(concat "payload." (asUpperCamelCase label)) cluster=parent.parent.name}} + {{/chip_cluster_command_arguments}} new CHIP{{>callbackName}}CallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = CallbackcallbackName}}CallbackType>::FromCancelable(success); diff --git a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt index 13c156cf0de519..5f9cdd8d6093a6 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt @@ -7,6 +7,7 @@ #import #include +#include typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values); @@ -22,11 +23,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIP{{asUpperCamelCase name}} : CHIPCluster {{#chip_cluster_commands}} -{{#if (zcl_command_arguments_count this.id)}} -- (void){{asLowerCamelCase name}}:{{#chip_cluster_command_arguments_with_structs_expanded}}{{#not_first}}{{asLowerCamelCase label}}:{{/not_first}}({{asObjectiveCBasicType type}}){{asLowerCamelCase label}} {{/chip_cluster_command_arguments_with_structs_expanded}}responseHandler:(ResponseHandler)responseHandler; -{{else}} -- (void){{asLowerCamelCase name}}:(ResponseHandler)responseHandler; -{{/if}} +- (void){{asLowerCamelCase name}}:(CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Payload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; {{/chip_cluster_commands}} {{#chip_server_cluster_attributes}} diff --git a/src/darwin/Framework/CHIP/templates/CHIPCommandPayloadsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPCommandPayloadsObjc-src.zapt new file mode 100644 index 00000000000000..52b1b76e35f99e --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/CHIPCommandPayloadsObjc-src.zapt @@ -0,0 +1,11 @@ +{{> header}} + +#import "CHIPCommandPayloadsObjc.h" + +{{#zcl_clusters}} +{{#zcl_commands}} +@implementation CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Payload +@end + +{{/zcl_commands}} +{{/zcl_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/CHIPCommandPayloadsObjc.zapt b/src/darwin/Framework/CHIP/templates/CHIPCommandPayloadsObjc.zapt new file mode 100644 index 00000000000000..24d20d7b41fbf7 --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/CHIPCommandPayloadsObjc.zapt @@ -0,0 +1,19 @@ +{{> header}} + +#ifndef CHIP_COMMAND_PAYLOADS_H +#define CHIP_COMMAND_PAYLOADS_H + +#import +#import + +{{#zcl_clusters}} +{{#zcl_commands}} +@interface CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Payload : NSObject +{{#zcl_command_arguments}} +@property (strong) {{asObjectiveCType type parent.parent.name}} {{asUpperCamelCase label}}; +{{/zcl_command_arguments}} +@end + +{{/zcl_commands}} +{{/zcl_clusters}} +#endif /* CHIP_COMMAND_PAYLOADS_H */ diff --git a/src/darwin/Framework/CHIP/templates/CHIPStructsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPStructsObjc-src.zapt new file mode 100644 index 00000000000000..93c7de26962f01 --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/CHIPStructsObjc-src.zapt @@ -0,0 +1,11 @@ +{{> header}} + +#import "CHIPStructsObjc.h" + +{{#zcl_clusters}} +{{#zcl_structs}} +@implementation CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} +@end + +{{/zcl_structs}} +{{/zcl_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/CHIPStructsObjc.zapt b/src/darwin/Framework/CHIP/templates/CHIPStructsObjc.zapt new file mode 100644 index 00000000000000..8f9d89750f81ae --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/CHIPStructsObjc.zapt @@ -0,0 +1,19 @@ +{{> header}} + +#ifndef CHIP_STRUCTS_H +#define CHIP_STRUCTS_H + +#import + +{{#zcl_clusters}} +{{#zcl_structs}} +@interface CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} : NSObject +{{#zcl_struct_items}} +@property (strong) {{asObjectiveCType type parent.parent.name}} {{asUpperCamelCase label}}; +{{/zcl_struct_items}} +@end + +{{/zcl_structs}} +{{/zcl_clusters}} + +#endif /* CHIP_STRUCTS_H */ diff --git a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt index fe71d829f37f5f..78997bf4065dec 100644 --- a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt +++ b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt @@ -139,7 +139,7 @@ CHIPDevice * GetConnectedDevice() CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster test:^(NSError * err, NSDictionary * values) { + [cluster test:[[CHIPTestClusterClusterTestPayload alloc] init] responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"ReuseCHIPClusterObject test Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; @@ -151,7 +151,7 @@ CHIPDevice * GetConnectedDevice() // Reuse the CHIPCluster Object for multiple times. - [cluster test:^(NSError * err, NSDictionary * values) { + [cluster test:[[CHIPTestClusterClusterTestPayload alloc] init] responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"ReuseCHIPClusterObject test Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; diff --git a/src/darwin/Framework/CHIP/templates/helper.js b/src/darwin/Framework/CHIP/templates/helper.js index 09ad83bc250c1a..b518b6549a6c9d 100644 --- a/src/darwin/Framework/CHIP/templates/helper.js +++ b/src/darwin/Framework/CHIP/templates/helper.js @@ -17,6 +17,7 @@ // Import helpers from zap core const zapPath = '../../../../../third_party/zap/repo/dist/src-electron/'; +const string = require(zapPath + 'util/string.js') const templateUtil = require(zapPath + 'generator/template-util.js') const zclHelper = require(zapPath + 'generator/helper-zcl.js') @@ -86,7 +87,7 @@ function asObjectiveCNumberType(label, type, asLowerCased) case 'uint16_t': return 'UnsignedShort'; case 'uint32_t': - return 'UnsignedLong'; + return 'UnsignedInt'; case 'uint64_t': return 'UnsignedLongLong'; case 'int8_t': @@ -94,7 +95,7 @@ function asObjectiveCNumberType(label, type, asLowerCased) case 'int16_t': return 'Short'; case 'int32_t': - return 'Long'; + return 'Int'; case 'int64_t': return 'LongLong'; default: @@ -114,6 +115,54 @@ function asTestIndex(index) return index.toString().padStart(6, 0); } +function asUpperCamelCase(label) +{ + let str = string.toCamelCase(label, false); + return str.replace(/[\.:]/g, ''); +} + +async function asObjectiveCClass(type, cluster, options) +{ + let pkgId = await templateUtil.ensureZclPackageId(this); + let isStruct = await zclHelper.isStruct(this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); + + if ((this.isList || this.isArray || this.entryType) && !options.hash.forceNotList) { + return 'NSArray'; + } + + if (StringHelper.isOctetString(type)) { + return 'NSData'; + } + + if (StringHelper.isCharString(type)) { + return 'NSString'; + } + + if (isStruct) { + return `CHIP${asUpperCamelCase(cluster)}Cluster${asUpperCamelCase(type)}`; + } + + return 'NSNumber'; +} + +async function asObjectiveCType(type, cluster, options) +{ + let typeStr = await asObjectiveCClass.call(this, type, cluster, options); + if (this.isNullable || this.isOptional) { + typeStr = `${typeStr} * _Nullable`; + } else { + typeStr = `${typeStr} * _Nonnull`; + } + + return typeStr; +} + +async function arrayElementObjectiveCClass(type, cluster, options) +{ + options.hash.forceNotList = true; + return asObjectiveCClass.call(this, type, cluster, options); +} + // // Module exports // @@ -122,3 +171,6 @@ exports.asObjectiveCNumberType = asObjectiveCNumberType; exports.asExpectedEndpointForCluster = asExpectedEndpointForCluster; exports.asTestIndex = asTestIndex; exports.asTestValue = asTestValue; +exports.asObjectiveCClass = asObjectiveCClass; +exports.asObjectiveCType = asObjectiveCType; +exports.arrayElementObjectiveCClass = arrayElementObjectiveCClass; diff --git a/src/darwin/Framework/CHIP/templates/partials/CHIPCallbackBridge.zapt b/src/darwin/Framework/CHIP/templates/partials/CHIPCallbackBridge.zapt index 6f9abc7bc6e373..7fe8ad17035bfd 100644 --- a/src/darwin/Framework/CHIP/templates/partials/CHIPCallbackBridge.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/CHIPCallbackBridge.zapt @@ -31,7 +31,14 @@ void CHIP{{> @partial-block}}Bridge::OnSuccessFn(void * context ) { {{#if (isStrEqual partial-type "Command")}} - {{>decode_response}} + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + {{#chip_cluster_response_arguments}} + { + id value; + {{>decode_value target="value" source=(concat "data." (asLowerCamelCase label)) cluster=parent.parent.name errorCode="OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); return;"}} + response[@"{{asUpperCamelCase label}}"] = value; + } + {{/chip_cluster_response_arguments}} DispatchSuccess(context, response); {{else if (isStrEqual partial-type "List")}} id array = [[NSMutableArray alloc] init]; @@ -49,16 +56,16 @@ void CHIP{{> @partial-block}}Bridge::OnSuccessFn(void * context {{! TODO: Add support for nullable types, probably by having a templated ToObjectiveCType function }} {{else if isArray}} {{! TODO: Add support for list members of structs in list attributes }} - @"{{name}}": [[NSMutableArray alloc] init], + @"{{asUpperCamelCase name}}": [[NSMutableArray alloc] init], {{else if (isOctetString type)}} - @"{{name}}" : [NSData dataWithBytes:entry.{{asLowerCamelCase name}}.data() length:entry.{{asLowerCamelCase name}}.size()], + @"{{asUpperCamelCase name}}" : [NSData dataWithBytes:entry.{{asLowerCamelCase name}}.data() length:entry.{{asLowerCamelCase name}}.size()], {{else if (isCharString type)}} - @"{{name}}" : [[NSString alloc] initWithBytes:entry.{{asLowerCamelCase name}}.data() length:entry.{{asLowerCamelCase name}}.size() encoding:NSUTF8StringEncoding], + @"{{asUpperCamelCase name}}" : [[NSString alloc] initWithBytes:entry.{{asLowerCamelCase name}}.data() length:entry.{{asLowerCamelCase name}}.size() encoding:NSUTF8StringEncoding], {{else if isStruct}} {{! TODO: Add support for struct members of structs in list attributes }} - @"{{name}}": @{} + @"{{asUpperCamelCase name}}": @{} {{else}} - @"{{name}}" : [NSNumber numberWith{{asObjectiveCNumberType label type false}}:entry.{{asLowerCamelCase name}}], + @"{{asUpperCamelCase name}}" : [NSNumber numberWith{{asObjectiveCNumberType label type false}}:entry.{{asLowerCamelCase name}}], {{/if}} {{/chip_attribute_list_entryTypes}} }]; diff --git a/src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt b/src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt new file mode 100644 index 00000000000000..d35a162a069848 --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt @@ -0,0 +1,44 @@ +{{#if isOptional}} + {{! This just means we expect a non-nil value. Go ahead and check the value, + stripping the optionality off. }} + {{>check_test_value actual=actual expected=expected cluster=cluster isOptional=false}} +{{else if isNullable}} + {{#if (isLiteralNull expected)}} + {{! TODO: This should be checking for nil once we fix our responses }} + XCTAssertTrue([{{actual}} isKindOfClass:[NSNull class]]); + {{else}} + XCTAssertFalse([{{actual}} isKindOfClass:[NSNull class]]); + {{>check_test_value actual=actual expected=expected cluster=cluster isNullable=false}} + {{/if}} +{{else if isArray}} + XCTAssertEqual([{{actual}} count], {{expected.length}}); + {{#each expected}} + {{>check_test_value actual=(concat ../actual "[" @index "]") expected=this cluster=../cluster isArray=false type=../type}} + {{/each}} +{{else}} + {{#if_is_struct type}} + {{! Iterate over the actual types in the struct, so we pick up the right + type/optionality/nullability information for them for our recursive + call. }} + {{#zcl_struct_items_by_struct_name type}} + {{#if (expectedValueHasProp ../expected (asLowerCamelCase label))}} + {{! TODO: This is a hack because right now some of our return values (attribute reads) are using NSDictionary for structs while others (commands) are using generated object types. Just support both for now. }} + if ([{{../actual}} isKindOfClass:[NSDictionary class]]) { + {{>check_test_value actual=(concat ../actual '[@"' (asUpperCamelCase label) '"]') expected=(lookup ../expected (asLowerCamelCase label)) cluster=../cluster}} + } else { + {{>check_test_value actual=(concat "[" ../actual (asUpperCamelCase label) "]") expected=(lookup ../expected (asLowerCamelCase label)) cluster=../cluster}} + } + {{/if}} + {{/zcl_struct_items_by_struct_name}} + {{! Maybe we should add a check for properties in the expected object (other + than "global") that are not present in the struct ? }} + {{else}} + {{#if (isOctetString type)}} + XCTAssertTrue([{{actual}} isEqualToData:[[NSData alloc] initWithBytes:"{{octetStringEscapedForCLiteral expected}}" length:{{expected.length}}]]); + {{else if (isCharString type)}} + XCTAssertTrue([{{actual}} isEqualToString:@"{{expected}}"]); + {{else}} + XCTAssertEqual([{{actual}} {{asObjectiveCNumberType "" type true}}Value], {{expected}}{{asTypeLiteralSuffix type}}); + {{/if}} + {{/if_is_struct}} +{{/if}} diff --git a/src/darwin/Framework/CHIP/templates/partials/decode_response.zapt b/src/darwin/Framework/CHIP/templates/partials/decode_response.zapt deleted file mode 100644 index 8b13c270388c3e..00000000000000 --- a/src/darwin/Framework/CHIP/templates/partials/decode_response.zapt +++ /dev/null @@ -1,15 +0,0 @@ -id response = @{ - {{#chip_cluster_response_arguments}} - @"{{asSymbol label}}": {{#if isOptional}}data.{{asLowerCamelCase label}}.HasValue() == false ? [NSNull null] : {{#if isNullable}}data.{{asLowerCamelCase label}}.Value().IsNull() ? [NSNull null] : {{/if}}{{/if}} - {{~#*inline "item"}}data.{{asLowerCamelCase name}}{{#if isOptional}}.Value(){{/if}}{{#if isNullable}}.Value(){{/if}}{{/inline}} - {{#if isArray}} - [NSNull null], /* Array - Conversion from this type to Objc is not properly implemented yet */ - {{else if (isOctetString type)}} - [NSData dataWithBytes:{{>item}}.data() length:{{>item}}.size()], - {{else if (isCharString type)}} - [[NSString alloc] initWithBytes:{{>item}}.data() length:{{>item}}.size() encoding:NSUTF8StringEncoding], - {{else}} - [NSNumber numberWith{{asObjectiveCNumberType label type false}}:{{>item}}], - {{/if}} - {{/chip_cluster_response_arguments}} -}; diff --git a/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt b/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt new file mode 100644 index 00000000000000..fb3688f656356d --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt @@ -0,0 +1,40 @@ +{{#if isOptional}} + if ({{source}}.HasValue()) { + {{>decode_value target=target source=(concat source ".Value()") cluster=cluster errorCode=errorCode isOptional=false}} + } else { + {{! TODO: Should just use nil here, but we're still adding these to + dictionaries for now }} + {{target}} = [NSNull null]; + } +{{else if isNullable}} + if ({{source}}.IsNull()) { + {{! Again, should use nil here }} + {{target}} = [NSNull null]; + } else { + {{>decode_value target=target source=(concat source ".Value()") cluster=cluster errorCode=errorCode isNullable=false}} + } +{{else if isArray}} + {{target}} = [[NSMutableArray alloc] init]; + auto iter = {{source}}.begin(); + while (iter.Next()) { + auto & entry = iter.GetValue(); + auto * newElement = [[{{asObjectiveCClass type cluster forceNotList=true}} alloc] init]; + {{>decode_value target="newElement" source="entry" cluster=cluster errorCode=errorCode isArray=false}} + [{{target}} addObject:newElement]; + } + if (iter.GetStatus() != CHIP_NO_ERROR) { + {{errorCode}} + } +{{else}} + {{#if_is_struct type}} + {{#zcl_struct_items_by_struct_name type}} + {{>decode_value target=(concat ../target "." (asUpperCamelCase label)) source=(concat ../source "." (asLowerCamelCase label)) cluster=../cluster}} + {{/zcl_struct_items_by_struct_name}} + {{else if (isOctetString type)}} + {{target}} = [NSData dataWithBytes:{{source}}.data() length:{{source}}.size()]; + {{else if (isCharString type)}} + {{target}} = [[NSString alloc] initWithBytes:{{source}}.data() length:{{source}}.size() encoding:NSUTF8StringEncoding]; + {{else}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}]; + {{/if_is_struct}} +{{/if}} diff --git a/src/darwin/Framework/CHIP/templates/partials/encode_command.zapt b/src/darwin/Framework/CHIP/templates/partials/encode_command.zapt deleted file mode 100644 index cd400fc63a6c98..00000000000000 --- a/src/darwin/Framework/CHIP/templates/partials/encode_command.zapt +++ /dev/null @@ -1,24 +0,0 @@ -{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Type request; -{{#chip_cluster_command_arguments}} - {{#*inline "value"}} - {{! TODO Implement complex types parsing in order to properly set the request parameters }} - {{#if isArray}} - {{zapTypeToEncodableClusterObjectType type ns=parent.parent.name}}(); - {{else if isStruct}} - {{zapTypeToEncodableClusterObjectType type ns=parent.parent.name}}(); - {{else if (isOctetString type)}} - [self asByteSpan:{{asLowerCamelCase label}}] - {{else if (isCharString type)}} - [self asCharSpan:{{asLowerCamelCase label}}] - {{else if isBitmap}} - static_cast({{asLowerCamelCase label}}) - {{else}} - {{#if_chip_enum type}} - static_cast({{asLowerCamelCase label}}) - {{else}} - {{asLowerCamelCase label}} - {{/if_chip_enum}} - {{/if}} - {{/inline}} - request.{{asLowerCamelCase label}} = {{#if isOptional}}{{zapTypeToEncodableClusterObjectType type ns=parent.parent.name}}({{/if}}{{#if isNullable}}chip::app::DataModel::Nullable<{{chipType}}>({{/if}}{{>value}}{{#if isNullable}}){{/if}}{{#if isOptional}}){{/if}}; -{{/chip_cluster_command_arguments}} diff --git a/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt b/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt new file mode 100644 index 00000000000000..eb6d99c14f9317 --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt @@ -0,0 +1,61 @@ +{{#if isOptional}} + if ({{source}} != nil) { + auto & definedValue = {{target}}.Emplace(); + {{>encode_value target="definedValue" source=source cluster=cluster isOptional=false}} + } +{{else if isNullable}} + if ({{source}} == nil) { + {{target}}.SetNull(); + } else { + auto & nonNullValue = {{target}}.SetNonNull(); + {{>encode_value target="nonNullValue" source=source cluster=cluster isNullable=false}} + } +{{else if isArray}} + {{! TODO: This is not great, with its fallible allocation and + whatnot. Maybe we should just switch to encoding our ObjC types + directly to TLV... We need the listFreer thing because we want + our allocation to live long enough, and if it's scoped to where + we are right now it may not (e.g. for a nullable list we're + inside an "else" block here). }} + { + using ListType = decltype({{target}}); + using ListMemberType = ListMemberTypeGetter::Type; + if ({{source}}.count != 0) { + auto * listHolder = new ListHolder({{source}}.count); + if (listHolder == nullptr || listHolder->mList == nullptr) { + // Now what? + return; + } + listFreer.add(listHolder); + for (size_t i = 0; i < {{source}}.count; ++i) { + if (![{{source}}[i] isKindOfClass:[{{asObjectiveCClass type cluster forceNotList=true}} class]]) { + // Wrong kind of value, now what? + return; + } + auto element = ({{asObjectiveCClass type cluster forceNotList=true}} *){{source}}[i]; + {{>encode_value target="listHolder->mList[i]" source="element" cluster=cluster isArray=false}} + } + {{target}} = ListType(listHolder->mList, {{source}}.count); + } else { + {{target}} = ListType(); + } + } +{{else if isStruct}} + {{#zcl_struct_items_by_struct_name type}} + {{>encode_value target=(concat ../target "." (asLowerCamelCase label)) source=(concat ../source "." (asUpperCamelCase label)) cluster=../cluster}} + {{/zcl_struct_items_by_struct_name}} +{{else if (isOctetString type)}} + {{target}} = [self asByteSpan:{{source}}]; +{{else if (isCharString type)}} + {{target}} = [self asCharSpan:{{source}}]; +{{else}} + {{#if_chip_enum type}} + {{target}} = static_cast>({{source}}.{{asObjectiveCNumberType source type true}}Value); + {{else}} + {{#if_is_bitmap type}} + {{target}} = static_cast>({{source}}.{{asObjectiveCNumberType source type true}}Value); + {{else}} + {{target}} = {{source}}.{{asObjectiveCNumberType source type true}}Value; + {{/if_is_bitmap}} + {{/if_chip_enum}} +{{/if}} diff --git a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt index efdbffa8c5c765..b8698546b7f183 100644 --- a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt @@ -18,6 +18,13 @@ bool testSendCluster{{parent.filename}}_{{asTestIndex index}}_{{asUpperCamelCase CHIPTest{{asUpperCamelCase cluster}} * cluster = [[CHIPTest{{asUpperCamelCase cluster}} alloc] initWithDevice:device endpoint:{{endpoint}} queue:queue]; XCTAssertNotNil(cluster); + {{#if isCommand}} + __auto_type * payload = [[CHIP{{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase command}}Payload alloc] init]; + {{#chip_tests_item_parameters}} + {{>test_value target=(concat "payload." (asUpperCamelCase label)) definedValue=definedValue cluster=parent.cluster}} + {{/chip_tests_item_parameters}} + [cluster {{asLowerCamelCase command}}:payload responseHandler:^(NSError * err, NSDictionary * values) { + {{else if isSubscribeAttribute}} {{#chip_tests_item_parameters}} {{#if (isString type)}} {{#if (isOctetString type)}} @@ -29,9 +36,6 @@ bool testSendCluster{{parent.filename}}_{{asTestIndex index}}_{{asUpperCamelCase {{asObjectiveCBasicType type}} {{asLowerCamelCase name}}Argument = {{definedValue}}{{asTypeLiteralSuffix type}}; {{/if}} {{/chip_tests_item_parameters}} - {{#if isCommand}} - [cluster {{asLowerCamelCase command}}:{{#chip_tests_item_parameters}}{{#not_first}}{{asLowerCamelCase name}}:{{/not_first}}{{asLowerCamelCase name}}Argument {{#last}}responseHandler:{{/last}}{{/chip_tests_item_parameters}}^(NSError * err, NSDictionary * values) { - {{else if isSubscribeAttribute}} [cluster subscribeAttribute{{asUpperCamelCase attribute}}WithMinInterval:minIntervalArgument maxInterval:maxIntervalArgument responseHandler:^(NSError * err, NSDictionary * values) { @@ -40,6 +44,17 @@ bool testSendCluster{{parent.filename}}_{{asTestIndex index}}_{{asUpperCamelCase {{else if isReadAttribute}} [cluster readAttribute{{asUpperCamelCase attribute}}WithResponseHandler:^(NSError * err, NSDictionary * values) { {{else if isWriteAttribute}} + {{#chip_tests_item_parameters}} + {{#if (isString type)}} + {{#if (isOctetString type)}} + NSData * {{asLowerCamelCase name}}Argument = [[NSData alloc] initWithBytes:"{{octetStringEscapedForCLiteral definedValue}}" length:{{definedValue.length}}]; + {{else}} + NSString * {{asLowerCamelCase name}}Argument= @"{{definedValue}}"; + {{/if}} + {{else}} + {{asObjectiveCBasicType type}} {{asLowerCamelCase name}}Argument = {{definedValue}}{{asTypeLiteralSuffix type}}; + {{/if}} + {{/chip_tests_item_parameters}} [cluster writeAttribute{{asUpperCamelCase attribute}}WithValue:{{#chip_tests_item_parameters}}{{asLowerCamelCase name}}Argument{{/chip_tests_item_parameters}} responseHandler:^(NSError * err, NSDictionary * values) { {{/if}} NSLog(@"{{label}} Error: %@", err); @@ -59,23 +74,10 @@ bool testSendCluster{{parent.filename}}_{{asTestIndex index}}_{{asUpperCamelCase {{#chip_tests_item_response_parameters}} {{#if hasExpectedValue}} - {{#if isList}} - XCTAssertEqual([values[@"{{#if parent.isAttribute}}value{{else}}{{name}}{{/if}}"] count], {{expectedValue.length}}); - {{else if isArray}} - XCTAssertEqual([values[@"{{#if parent.isAttribute}}value{{else}}{{name}}{{/if}}"] count], {{expectedValue.length}}); - {{else}} - {{#if (isString type)}} - {{#if (isOctetString type)}} - NSData * {{asLowerCamelCase name}}Argument = [[NSData alloc] initWithBytes:"{{octetStringEscapedForCLiteral expectedValue}}" length:{{expectedValue.length}}]; - XCTAssertTrue([values[@"{{#if parent.isAttribute}}value{{else}}{{name}}{{/if}}"] isEqualToData:{{asLowerCamelCase name}}Argument]); - {{else}} - NSString * {{asLowerCamelCase name}}Argument= @"{{expectedValue}}"; - XCTAssertTrue([values[@"{{#if parent.isAttribute}}value{{else}}{{name}}{{/if}}"] isEqualToString:{{asLowerCamelCase name}}Argument]); - {{/if}} - {{else}} - XCTAssertEqual([values[@"{{#if parent.isAttribute}}value{{else}}{{name}}{{/if}}"] {{asObjectiveCNumberType "" type true}}Value], {{expectedValue}}{{asTypeLiteralSuffix type}}); - {{/if}} - {{/if}} + { + id actualValue = values[@"{{#if parent.isAttribute}}value{{else}}{{asUpperCamelCase name}}{{/if}}"]; + {{>check_test_value actual="actualValue" expected=expectedValue cluster=../cluster}} + } {{/if}} {{#if hasExpectedConstraints}} {{#if expectedConstraints.minLength}} diff --git a/src/darwin/Framework/CHIP/templates/partials/test_value.zapt b/src/darwin/Framework/CHIP/templates/partials/test_value.zapt new file mode 100644 index 00000000000000..0f936599d384b5 --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/partials/test_value.zapt @@ -0,0 +1,34 @@ +{{#if isOptional}} + {{! Just go ahead and assign to the value, stripping the optionality bit off. }} + {{>test_value target=target definedValue=definedValue cluster=cluster isOptional=false}} +{{else if isNullable}} + {{#if (isLiteralNull definedValue)}} + {{target}} = nil; + {{else}} + {{>test_value target=target definedValue=definedValue cluster=cluster isNullable=false}} + {{/if}} +{{else if isArray}} + { + NSMutableArray * temp = [[NSMutableArray alloc] init]; + {{#each definedValue}} + {{>test_value target=(concat "temp[" @index "]") definedValue=this cluster=../cluster type=../type isArray=false}} + {{/each}} + {{target}} = temp; + } +{{else}} + {{#if_is_struct type}} + {{target}} = [[CHIP{{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase type}} alloc] init]; + {{#zcl_struct_items_by_struct_name type}} + {{! target may be some place where we lost type information (e.g. an id), + so add explicit cast when trying to assign to our properties. }} + {{>test_value target=(concat "((CHIP" (asUpperCamelCase ../cluster) "Cluster" (asUpperCamelCase ../type) " *)" ../target ")." (asUpperCamelCase label)) definedValue=(lookup ../definedValue name) cluster=../cluster}} + {{/zcl_struct_items_by_struct_name}} + + {{else if (isCharString type)}} + {{target}} = @"{{definedValue}}"; + {{else if (isOctetString type)}} + {{target}} = [[NSData alloc] initWithBytes:"{{octetStringEscapedForCLiteral definedValue}}" length:{{definedValue.length}}]; + {{else}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType definedValue type false}}:{{definedValue}}]; + {{/if_is_struct}} +{{/if}} diff --git a/src/darwin/Framework/CHIP/templates/templates.json b/src/darwin/Framework/CHIP/templates/templates.json index 0828096d4f980f..dfbf952022342c 100644 --- a/src/darwin/Framework/CHIP/templates/templates.json +++ b/src/darwin/Framework/CHIP/templates/templates.json @@ -25,12 +25,20 @@ "path": "partials/CHIPCallbackBridge.zapt" }, { - "name": "encode_command", - "path": "partials/encode_command.zapt" + "name": "encode_value", + "path": "partials/encode_value.zapt" }, { - "name": "decode_response", - "path": "partials/decode_response.zapt" + "name": "decode_value", + "path": "partials/decode_value.zapt" + }, + { + "name": "test_value", + "path": "partials/test_value.zapt" + }, + { + "name": "check_test_value", + "path": "partials/check_test_value.zapt" } ], "templates": [ @@ -59,6 +67,26 @@ "name": "Objc ZCL API", "output": "src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm" }, + { + "path": "CHIPStructsObjc.zapt", + "name": "Objc reflections of CHIP spec structs header", + "output": "src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h" + }, + { + "path": "CHIPStructsObjc-src.zapt", + "name": "Objc reflections of CHIP spec structs", + "output": "src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm" + }, + { + "path": "CHIPCommandPayloadsObjc.zapt", + "name": "Objc reflections of CHIP command payloads header", + "output": "src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h" + }, + { + "path": "CHIPCommandPayloadsObjc-src.zapt", + "name": "Objc reflections of CHIP command payloads header", + "output": "src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm" + }, { "path": "CHIPTestClustersObjc.zapt", "name": "Test Objc API Header", diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 4fd78fcd161516..7f7d49d7a22831 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -18,6 +18,8 @@ // THIS FILE IS GENERATED BY ZAP #import "CHIPCallbackBridge_internal.h" +#import "CHIPCommandPayloadsObjc.h" +#import "CHIPStructsObjc.h" void CHIPDefaultSuccessCallbackBridge::OnSuccessFn(void * context) { DispatchSuccess(context, nil); }; @@ -59,12 +61,12 @@ void CHIPInt32uAttributeCallbackBridge::OnSuccessFn(void * context, uint32_t value) { - DispatchSuccess(context, @ { @"value" : [NSNumber numberWithUnsignedLong:value] }); + DispatchSuccess(context, @ { @"value" : [NSNumber numberWithUnsignedInt:value] }); }; void CHIPInt32sAttributeCallbackBridge::OnSuccessFn(void * context, int32_t value) { - DispatchSuccess(context, @ { @"value" : [NSNumber numberWithLong:value] }); + DispatchSuccess(context, @ { @"value" : [NSNumber numberWithInt:value] }); }; void CHIPInt64uAttributeCallbackBridge::OnSuccessFn(void * context, uint64_t value) @@ -104,9 +106,9 @@ auto & entry = iter.GetValue(); (void) entry; // All our types below might be unsupported [array addObject:@ { - @"index" : [NSNumber numberWithUnsignedChar:entry.index], - @"outputType" : [NSNumber numberWithUnsignedChar:entry.outputType], - @"name" : [[NSString alloc] initWithBytes:entry.name.data() length:entry.name.size() encoding:NSUTF8StringEncoding], + @"Index" : [NSNumber numberWithUnsignedChar:entry.index], + @"OutputType" : [NSNumber numberWithUnsignedChar:entry.outputType], + @"Name" : [[NSString alloc] initWithBytes:entry.name.data() length:entry.name.size() encoding:NSUTF8StringEncoding], }]; } if (iter.GetStatus() != CHIP_NO_ERROR) { @@ -211,8 +213,8 @@ auto & entry = iter.GetValue(); (void) entry; // All our types below might be unsupported [array addObject:@ { - @"type" : [NSNumber numberWithUnsignedLong:entry.type], - @"revision" : [NSNumber numberWithUnsignedShort:entry.revision], + @"Type" : [NSNumber numberWithUnsignedInt:entry.type], + @"Revision" : [NSNumber numberWithUnsignedShort:entry.revision], }]; } if (iter.GetStatus() != CHIP_NO_ERROR) { @@ -231,7 +233,7 @@ while (iter.Next()) { auto & entry = iter.GetValue(); (void) entry; // All our types below might be unsupported - [array addObject:[NSNumber numberWithUnsignedLong:entry]]; + [array addObject:[NSNumber numberWithUnsignedInt:entry]]; } if (iter.GetStatus() != CHIP_NO_ERROR) { OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); @@ -249,7 +251,7 @@ while (iter.Next()) { auto & entry = iter.GetValue(); (void) entry; // All our types below might be unsupported - [array addObject:[NSNumber numberWithUnsignedLong:entry]]; + [array addObject:[NSNumber numberWithUnsignedInt:entry]]; } if (iter.GetStatus() != CHIP_NO_ERROR) { OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); @@ -286,8 +288,8 @@ auto & entry = iter.GetValue(); (void) entry; // All our types below might be unsupported [array addObject:@ { - @"label" : [[NSString alloc] initWithBytes:entry.label.data() length:entry.label.size() encoding:NSUTF8StringEncoding], - @"value" : [[NSString alloc] initWithBytes:entry.value.data() length:entry.value.size() encoding:NSUTF8StringEncoding], + @"Label" : [[NSString alloc] initWithBytes:entry.label.data() length:entry.label.size() encoding:NSUTF8StringEncoding], + @"Value" : [[NSString alloc] initWithBytes:entry.value.data() length:entry.value.size() encoding:NSUTF8StringEncoding], }]; } if (iter.GetStatus() != CHIP_NO_ERROR) { @@ -308,7 +310,7 @@ auto & entry = iter.GetValue(); (void) entry; // All our types below might be unsupported [array addObject:@ { - @"FailSafeExpiryLengthMs" : [NSNumber numberWithUnsignedLong:entry.failSafeExpiryLengthMs], + @"FailSafeExpiryLengthMs" : [NSNumber numberWithUnsignedInt:entry.failSafeExpiryLengthMs], }]; } if (iter.GetStatus() != CHIP_NO_ERROR) { @@ -400,10 +402,10 @@ auto & entry = iter.GetValue(); (void) entry; // All our types below might be unsupported [array addObject:@ { - @"index" : [NSNumber numberWithUnsignedChar:entry.index], - @"inputType" : [NSNumber numberWithUnsignedChar:entry.inputType], - @"name" : [[NSString alloc] initWithBytes:entry.name.data() length:entry.name.size() encoding:NSUTF8StringEncoding], - @"description" : [[NSString alloc] initWithBytes:entry.description.data() + @"Index" : [NSNumber numberWithUnsignedChar:entry.index], + @"InputType" : [NSNumber numberWithUnsignedChar:entry.inputType], + @"Name" : [[NSString alloc] initWithBytes:entry.name.data() length:entry.name.size() encoding:NSUTF8StringEncoding], + @"Description" : [[NSString alloc] initWithBytes:entry.description.data() length:entry.description.size() encoding:NSUTF8StringEncoding], }]; @@ -427,7 +429,7 @@ [array addObject:@ { @"Label" : [[NSString alloc] initWithBytes:entry.label.data() length:entry.label.size() encoding:NSUTF8StringEncoding], @"Mode" : [NSNumber numberWithUnsignedChar:entry.mode], - @"SemanticTag" : [NSNumber numberWithUnsignedLong:entry.semanticTag], + @"SemanticTag" : [NSNumber numberWithUnsignedInt:entry.semanticTag], }]; } if (iter.GetStatus() != CHIP_NO_ERROR) { @@ -512,9 +514,9 @@ [array addObject:@ { @"Id" : [NSNumber numberWithUnsignedLongLong:entry.id], @"Name" : [[NSString alloc] initWithBytes:entry.name.data() length:entry.name.size() encoding:NSUTF8StringEncoding], - @"StackFreeCurrent" : [NSNumber numberWithUnsignedLong:entry.stackFreeCurrent], - @"StackFreeMinimum" : [NSNumber numberWithUnsignedLong:entry.stackFreeMinimum], - @"StackSize" : [NSNumber numberWithUnsignedLong:entry.stackSize], + @"StackFreeCurrent" : [NSNumber numberWithUnsignedInt:entry.stackFreeCurrent], + @"StackFreeMinimum" : [NSNumber numberWithUnsignedInt:entry.stackFreeMinimum], + @"StackSize" : [NSNumber numberWithUnsignedInt:entry.stackSize], }]; } if (iter.GetStatus() != CHIP_NO_ERROR) { @@ -534,13 +536,13 @@ auto & entry = iter.GetValue(); (void) entry; // All our types below might be unsupported [array addObject:@ { - @"majorNumber" : [NSNumber numberWithUnsignedShort:entry.majorNumber], - @"minorNumber" : [NSNumber numberWithUnsignedShort:entry.minorNumber], - @"name" : [[NSString alloc] initWithBytes:entry.name.data() length:entry.name.size() encoding:NSUTF8StringEncoding], - @"callSign" : [[NSString alloc] initWithBytes:entry.callSign.data() + @"MajorNumber" : [NSNumber numberWithUnsignedShort:entry.majorNumber], + @"MinorNumber" : [NSNumber numberWithUnsignedShort:entry.minorNumber], + @"Name" : [[NSString alloc] initWithBytes:entry.name.data() length:entry.name.size() encoding:NSUTF8StringEncoding], + @"CallSign" : [[NSString alloc] initWithBytes:entry.callSign.data() length:entry.callSign.size() encoding:NSUTF8StringEncoding], - @"affiliateCallSign" : [[NSString alloc] initWithBytes:entry.affiliateCallSign.data() + @"AffiliateCallSign" : [[NSString alloc] initWithBytes:entry.affiliateCallSign.data() length:entry.affiliateCallSign.size() encoding:NSUTF8StringEncoding], }]; @@ -563,8 +565,8 @@ auto & entry = iter.GetValue(); (void) entry; // All our types below might be unsupported [array addObject:@ { - @"identifier" : [NSNumber numberWithUnsignedChar:entry.identifier], - @"name" : [[NSString alloc] initWithBytes:entry.name.data() length:entry.name.size() encoding:NSUTF8StringEncoding], + @"Identifier" : [NSNumber numberWithUnsignedChar:entry.identifier], + @"Name" : [[NSString alloc] initWithBytes:entry.name.data() length:entry.name.size() encoding:NSUTF8StringEncoding], }]; } if (iter.GetStatus() != CHIP_NO_ERROR) { @@ -620,8 +622,8 @@ auto & entry = iter.GetValue(); (void) entry; // All our types below might be unsupported [array addObject:@ { - @"fabricIndex" : [NSNumber numberWithUnsignedLongLong:entry.fabricIndex], - @"operationalCert" : [NSData dataWithBytes:entry.operationalCert.data() length:entry.operationalCert.size()], + @"FabricIndex" : [NSNumber numberWithUnsignedLongLong:entry.fabricIndex], + @"OperationalCert" : [NSData dataWithBytes:entry.operationalCert.data() length:entry.operationalCert.size()], }]; } if (iter.GetStatus() != CHIP_NO_ERROR) { @@ -662,11 +664,11 @@ (void) entry; // All our types below might be unsupported [array addObject:@ { @"ExtAddress" : [NSNumber numberWithUnsignedLongLong:entry.extAddress], - @"Age" : [NSNumber numberWithUnsignedLong:entry.age], + @"Age" : [NSNumber numberWithUnsignedInt:entry.age], @"Rloc16" : [NSNumber numberWithUnsignedShort:entry.rloc16], - @"LinkFrameCounter" : [NSNumber numberWithUnsignedLong:entry.linkFrameCounter], - @"MleFrameCounter" : [NSNumber numberWithUnsignedLong:entry.mleFrameCounter], - @"LQI" : [NSNumber numberWithUnsignedChar:entry.lqi], + @"LinkFrameCounter" : [NSNumber numberWithUnsignedInt:entry.linkFrameCounter], + @"MleFrameCounter" : [NSNumber numberWithUnsignedInt:entry.mleFrameCounter], + @"Lqi" : [NSNumber numberWithUnsignedChar:entry.lqi], @"AverageRssi" : [NSNumber numberWithChar:entry.averageRssi], @"LastRssi" : [NSNumber numberWithChar:entry.lastRssi], @"FrameErrorRate" : [NSNumber numberWithUnsignedChar:entry.frameErrorRate], @@ -790,820 +792,1488 @@ void CHIPAccountLoginClusterGetSetupPINResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & data) { - id response = @ { - @"setupPIN" : [[NSString alloc] initWithBytes:data.setupPIN.data() - length:data.setupPIN.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [[NSString alloc] initWithBytes:data.setupPIN.data() length:data.setupPIN.size() encoding:NSUTF8StringEncoding]; + response[@"SetupPIN"] = value; + } DispatchSuccess(context, response); }; void CHIPApplicationLauncherClusterLaunchAppResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"data" : [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; + response[@"Data"] = value; + } DispatchSuccess(context, response); }; void CHIPContentLauncherClusterLaunchContentResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::ContentLauncher::Commands::LaunchContentResponse::DecodableType & data) { - id response = @ { - @"data" : [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding], - @"contentLaunchStatus" : [NSNumber numberWithUnsignedChar:data.contentLaunchStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; + response[@"Data"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.contentLaunchStatus]; + response[@"ContentLaunchStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPContentLauncherClusterLaunchURLResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::ContentLauncher::Commands::LaunchURLResponse::DecodableType & data) { - id response = @ { - @"data" : [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding], - @"contentLaunchStatus" : [NSNumber numberWithUnsignedChar:data.contentLaunchStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; + response[@"Data"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.contentLaunchStatus]; + response[@"ContentLaunchStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"content" : [NSData dataWithBytes:data.content.data() length:data.content.size()], - @"timeStamp" : [NSNumber numberWithUnsignedLong:data.timeStamp], - @"timeSinceBoot" : [NSNumber numberWithUnsignedLong:data.timeSinceBoot], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSData dataWithBytes:data.content.data() length:data.content.size()]; + response[@"Content"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedInt:data.timeStamp]; + response[@"TimeStamp"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedInt:data.timeSinceBoot]; + response[@"TimeSinceBoot"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterClearAllPinsResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::ClearAllPinsResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterClearAllRfidsResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::ClearAllRfidsResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterClearHolidayScheduleResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::ClearHolidayScheduleResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterClearPinResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::ClearPinResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterClearRfidResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::ClearRfidResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterClearWeekdayScheduleResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::ClearWeekdayScheduleResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterClearYeardayScheduleResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::ClearYeardayScheduleResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterGetHolidayScheduleResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data) { - id response = @ { - @"scheduleId" : [NSNumber numberWithUnsignedChar:data.scheduleId], - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"localStartTime" : [NSNumber numberWithUnsignedLong:data.localStartTime], - @"localEndTime" : [NSNumber numberWithUnsignedLong:data.localEndTime], - @"operatingModeDuringHoliday" : [NSNumber numberWithUnsignedChar:data.operatingModeDuringHoliday], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.scheduleId]; + response[@"ScheduleId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedInt:data.localStartTime]; + response[@"LocalStartTime"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedInt:data.localEndTime]; + response[@"LocalEndTime"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.operatingModeDuringHoliday]; + response[@"OperatingModeDuringHoliday"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterGetLogRecordResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::GetLogRecordResponse::DecodableType & data) { - id response = @ { - @"logEntryId" : [NSNumber numberWithUnsignedShort:data.logEntryId], - @"timestamp" : [NSNumber numberWithUnsignedLong:data.timestamp], - @"eventType" : [NSNumber numberWithUnsignedChar:data.eventType], - @"source" : [NSNumber numberWithUnsignedChar:data.source], - @"eventIdOrAlarmCode" : [NSNumber numberWithUnsignedChar:data.eventIdOrAlarmCode], - @"userId" : [NSNumber numberWithUnsignedShort:data.userId], - @"pin" : [NSData dataWithBytes:data.pin.data() length:data.pin.size()], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedShort:data.logEntryId]; + response[@"LogEntryId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedInt:data.timestamp]; + response[@"Timestamp"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.eventType]; + response[@"EventType"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.source]; + response[@"Source"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.eventIdOrAlarmCode]; + response[@"EventIdOrAlarmCode"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.userId]; + response[@"UserId"] = value; + } + { + id value; + value = [NSData dataWithBytes:data.pin.data() length:data.pin.size()]; + response[@"Pin"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterGetPinResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::GetPinResponse::DecodableType & data) { - id response = @ { - @"userId" : [NSNumber numberWithUnsignedShort:data.userId], - @"userStatus" : [NSNumber numberWithUnsignedChar:data.userStatus], - @"userType" : [NSNumber numberWithUnsignedChar:data.userType], - @"pin" : [NSData dataWithBytes:data.pin.data() length:data.pin.size()], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedShort:data.userId]; + response[@"UserId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.userStatus]; + response[@"UserStatus"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.userType]; + response[@"UserType"] = value; + } + { + id value; + value = [NSData dataWithBytes:data.pin.data() length:data.pin.size()]; + response[@"Pin"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterGetRfidResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::GetRfidResponse::DecodableType & data) { - id response = @ { - @"userId" : [NSNumber numberWithUnsignedShort:data.userId], - @"userStatus" : [NSNumber numberWithUnsignedChar:data.userStatus], - @"userType" : [NSNumber numberWithUnsignedChar:data.userType], - @"rfid" : [NSData dataWithBytes:data.rfid.data() length:data.rfid.size()], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedShort:data.userId]; + response[@"UserId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.userStatus]; + response[@"UserStatus"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.userType]; + response[@"UserType"] = value; + } + { + id value; + value = [NSData dataWithBytes:data.rfid.data() length:data.rfid.size()]; + response[@"Rfid"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterGetUserTypeResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::GetUserTypeResponse::DecodableType & data) { - id response = @ { - @"userId" : [NSNumber numberWithUnsignedShort:data.userId], - @"userType" : [NSNumber numberWithUnsignedChar:data.userType], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedShort:data.userId]; + response[@"UserId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.userType]; + response[@"UserType"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterGetWeekdayScheduleResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::GetWeekdayScheduleResponse::DecodableType & data) { - id response = @ { - @"scheduleId" : [NSNumber numberWithUnsignedChar:data.scheduleId], - @"userId" : [NSNumber numberWithUnsignedShort:data.userId], - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"daysMask" : [NSNumber numberWithUnsignedChar:data.daysMask], - @"startHour" : [NSNumber numberWithUnsignedChar:data.startHour], - @"startMinute" : [NSNumber numberWithUnsignedChar:data.startMinute], - @"endHour" : [NSNumber numberWithUnsignedChar:data.endHour], - @"endMinute" : [NSNumber numberWithUnsignedChar:data.endMinute], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.scheduleId]; + response[@"ScheduleId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.userId]; + response[@"UserId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.daysMask]; + response[@"DaysMask"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.startHour]; + response[@"StartHour"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.startMinute]; + response[@"StartMinute"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.endHour]; + response[@"EndHour"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.endMinute]; + response[@"EndMinute"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterGetYeardayScheduleResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::GetYeardayScheduleResponse::DecodableType & data) { - id response = @ { - @"scheduleId" : [NSNumber numberWithUnsignedChar:data.scheduleId], - @"userId" : [NSNumber numberWithUnsignedShort:data.userId], - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"localStartTime" : [NSNumber numberWithUnsignedLong:data.localStartTime], - @"localEndTime" : [NSNumber numberWithUnsignedLong:data.localEndTime], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.scheduleId]; + response[@"ScheduleId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.userId]; + response[@"UserId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedInt:data.localStartTime]; + response[@"LocalStartTime"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedInt:data.localEndTime]; + response[@"LocalEndTime"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterLockDoorResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::LockDoorResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterSetHolidayScheduleResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::SetHolidayScheduleResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterSetPinResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::SetPinResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterSetRfidResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::SetRfidResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterSetUserTypeResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::SetUserTypeResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterSetWeekdayScheduleResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::SetWeekdayScheduleResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterSetYeardayScheduleResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::SetYeardayScheduleResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterUnlockDoorResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::UnlockDoorResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPDoorLockClusterUnlockWithTimeoutResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::DoorLock::Commands::UnlockWithTimeoutResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data) { - id response = @ { - @"errorCode" : [NSNumber numberWithUnsignedChar:data.errorCode], - @"debugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorCode]; + response[@"ErrorCode"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } DispatchSuccess(context, response); }; void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & data) { - id response = @ { - @"errorCode" : [NSNumber numberWithUnsignedChar:data.errorCode], - @"debugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorCode]; + response[@"ErrorCode"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } DispatchSuccess(context, response); }; void CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & data) { - id response = @ { - @"errorCode" : [NSNumber numberWithUnsignedChar:data.errorCode], - @"debugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorCode]; + response[@"ErrorCode"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } DispatchSuccess(context, response); }; void CHIPGroupsClusterAddGroupResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"groupId" : [NSNumber numberWithUnsignedShort:data.groupId], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.groupId]; + response[@"GroupId"] = value; + } DispatchSuccess(context, response); }; void CHIPGroupsClusterGetGroupMembershipResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & data) { - id response = @ { - @"capacity" : [NSNumber numberWithUnsignedChar:data.capacity], - @"groupCount" : [NSNumber numberWithUnsignedChar:data.groupCount], - @"groupList" : [NSNull null], /* Array - Conversion from this type to Objc is not properly implemented yet */ - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.capacity]; + response[@"Capacity"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.groupCount]; + response[@"GroupCount"] = value; + } + { + id value; + value = [[NSMutableArray alloc] init]; + auto iter = data.groupList.begin(); + while (iter.Next()) { + auto & entry = iter.GetValue(); + auto * newElement = [[NSNumber alloc] init]; + newElement = [NSNumber numberWithUnsignedShort:entry]; + [value addObject:newElement]; + } + if (iter.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + response[@"GroupList"] = value; + } DispatchSuccess(context, response); }; void CHIPGroupsClusterRemoveGroupResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"groupId" : [NSNumber numberWithUnsignedShort:data.groupId], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.groupId]; + response[@"GroupId"] = value; + } DispatchSuccess(context, response); }; void CHIPGroupsClusterViewGroupResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"groupId" : [NSNumber numberWithUnsignedShort:data.groupId], - @"groupName" : [[NSString alloc] initWithBytes:data.groupName.data() - length:data.groupName.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.groupId]; + response[@"GroupId"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.groupName.data() length:data.groupName.size() encoding:NSUTF8StringEncoding]; + response[@"GroupName"] = value; + } DispatchSuccess(context, response); }; void CHIPIdentifyClusterIdentifyQueryResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Identify::Commands::IdentifyQueryResponse::DecodableType & data) { - id response = @ { - @"timeout" : [NSNumber numberWithUnsignedShort:data.timeout], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedShort:data.timeout]; + response[@"Timeout"] = value; + } DispatchSuccess(context, response); }; void CHIPKeypadInputClusterSendKeyResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } DispatchSuccess(context, response); }; void CHIPMediaPlaybackClusterMediaFastForwardResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::MediaPlayback::Commands::MediaFastForwardResponse::DecodableType & data) { - id response = @ { - @"mediaPlaybackStatus" : [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + response[@"MediaPlaybackStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPMediaPlaybackClusterMediaNextResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::MediaPlayback::Commands::MediaNextResponse::DecodableType & data) { - id response = @ { - @"mediaPlaybackStatus" : [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + response[@"MediaPlaybackStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPMediaPlaybackClusterMediaPauseResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::MediaPlayback::Commands::MediaPauseResponse::DecodableType & data) { - id response = @ { - @"mediaPlaybackStatus" : [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + response[@"MediaPlaybackStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPMediaPlaybackClusterMediaPlayResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::MediaPlayback::Commands::MediaPlayResponse::DecodableType & data) { - id response = @ { - @"mediaPlaybackStatus" : [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + response[@"MediaPlaybackStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPMediaPlaybackClusterMediaPreviousResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::MediaPlayback::Commands::MediaPreviousResponse::DecodableType & data) { - id response = @ { - @"mediaPlaybackStatus" : [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + response[@"MediaPlaybackStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPMediaPlaybackClusterMediaRewindResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::MediaPlayback::Commands::MediaRewindResponse::DecodableType & data) { - id response = @ { - @"mediaPlaybackStatus" : [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + response[@"MediaPlaybackStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPMediaPlaybackClusterMediaSeekResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::MediaPlayback::Commands::MediaSeekResponse::DecodableType & data) { - id response = @ { - @"mediaPlaybackStatus" : [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + response[@"MediaPlaybackStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPMediaPlaybackClusterMediaSkipBackwardResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::MediaPlayback::Commands::MediaSkipBackwardResponse::DecodableType & data) { - id response = @ { - @"mediaPlaybackStatus" : [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + response[@"MediaPlaybackStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPMediaPlaybackClusterMediaSkipForwardResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::MediaPlayback::Commands::MediaSkipForwardResponse::DecodableType & data) { - id response = @ { - @"mediaPlaybackStatus" : [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + response[@"MediaPlaybackStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPMediaPlaybackClusterMediaStartOverResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::MediaPlayback::Commands::MediaStartOverResponse::DecodableType & data) { - id response = @ { - @"mediaPlaybackStatus" : [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + response[@"MediaPlaybackStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPMediaPlaybackClusterMediaStopResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::MediaPlayback::Commands::MediaStopResponse::DecodableType & data) { - id response = @ { - @"mediaPlaybackStatus" : [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + response[@"MediaPlaybackStatus"] = value; + } DispatchSuccess(context, response); }; void CHIPNetworkCommissioningClusterAddThreadNetworkResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::NetworkCommissioning::Commands::AddThreadNetworkResponse::DecodableType & data) { - id response = @ { - @"errorCode" : [NSNumber numberWithUnsignedChar:data.errorCode], - @"debugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorCode]; + response[@"ErrorCode"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } DispatchSuccess(context, response); }; void CHIPNetworkCommissioningClusterAddWiFiNetworkResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::NetworkCommissioning::Commands::AddWiFiNetworkResponse::DecodableType & data) { - id response = @ { - @"errorCode" : [NSNumber numberWithUnsignedChar:data.errorCode], - @"debugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorCode]; + response[@"ErrorCode"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } DispatchSuccess(context, response); }; void CHIPNetworkCommissioningClusterDisableNetworkResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::NetworkCommissioning::Commands::DisableNetworkResponse::DecodableType & data) { - id response = @ { - @"errorCode" : [NSNumber numberWithUnsignedChar:data.errorCode], - @"debugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorCode]; + response[@"ErrorCode"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } DispatchSuccess(context, response); }; void CHIPNetworkCommissioningClusterEnableNetworkResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::NetworkCommissioning::Commands::EnableNetworkResponse::DecodableType & data) { - id response = @ { - @"errorCode" : [NSNumber numberWithUnsignedChar:data.errorCode], - @"debugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorCode]; + response[@"ErrorCode"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } DispatchSuccess(context, response); }; void CHIPNetworkCommissioningClusterRemoveNetworkResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetworkResponse::DecodableType & data) { - id response = @ { - @"errorCode" : [NSNumber numberWithUnsignedChar:data.errorCode], - @"debugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorCode]; + response[@"ErrorCode"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } DispatchSuccess(context, response); }; void CHIPNetworkCommissioningClusterScanNetworksResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data) { - id response = @ { - @"errorCode" : [NSNumber numberWithUnsignedChar:data.errorCode], - @"debugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - @"wifiScanResults" : [NSNull null], /* Array - Conversion from this type to Objc is not properly implemented yet */ - @"threadScanResults" : [NSNull null], /* Array - Conversion from this type to Objc is not properly implemented yet */ - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorCode]; + response[@"ErrorCode"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } + { + id value; + value = [[NSMutableArray alloc] init]; + auto iter = data.wifiScanResults.begin(); + while (iter.Next()) { + auto & entry = iter.GetValue(); + auto * newElement = [[CHIPNetworkCommissioningClusterWiFiInterfaceScanResult alloc] init]; + newElement.Security = [NSNumber numberWithUnsignedChar:entry.security]; + newElement.Ssid = [NSData dataWithBytes:entry.ssid.data() length:entry.ssid.size()]; + newElement.Bssid = [NSData dataWithBytes:entry.bssid.data() length:entry.bssid.size()]; + newElement.Channel = [NSNumber numberWithUnsignedChar:entry.channel]; + newElement.FrequencyBand = [NSNumber numberWithUnsignedInt:entry.frequencyBand]; + [value addObject:newElement]; + } + if (iter.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + response[@"WifiScanResults"] = value; + } + { + id value; + value = [[NSMutableArray alloc] init]; + auto iter = data.threadScanResults.begin(); + while (iter.Next()) { + auto & entry = iter.GetValue(); + auto * newElement = [[CHIPNetworkCommissioningClusterThreadInterfaceScanResult alloc] init]; + newElement.DiscoveryResponse = [NSData dataWithBytes:entry.discoveryResponse.data() + length:entry.discoveryResponse.size()]; + [value addObject:newElement]; + } + if (iter.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + response[@"ThreadScanResults"] = value; + } DispatchSuccess(context, response); }; void CHIPNetworkCommissioningClusterUpdateThreadNetworkResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::NetworkCommissioning::Commands::UpdateThreadNetworkResponse::DecodableType & data) { - id response = @ { - @"errorCode" : [NSNumber numberWithUnsignedChar:data.errorCode], - @"debugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorCode]; + response[@"ErrorCode"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } DispatchSuccess(context, response); }; void CHIPNetworkCommissioningClusterUpdateWiFiNetworkResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::NetworkCommissioning::Commands::UpdateWiFiNetworkResponse::DecodableType & data) { - id response = @ { - @"errorCode" : [NSNumber numberWithUnsignedChar:data.errorCode], - @"debugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorCode]; + response[@"ErrorCode"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } DispatchSuccess(context, response); }; void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data) { - id response = @ { - @"action" : [NSNumber numberWithUnsignedChar:data.action], - @"delayedActionTime" : [NSNumber numberWithUnsignedLong:data.delayedActionTime], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.action]; + response[@"Action"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedInt:data.delayedActionTime]; + response[@"DelayedActionTime"] = value; + } DispatchSuccess(context, response); }; void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"delayedActionTime" : data.delayedActionTime.HasValue() == false - ? [NSNull null] - : [NSNumber numberWithUnsignedLong:data.delayedActionTime.Value()], - @"imageURI" : data.imageURI.HasValue() == false ? [NSNull null] - : [[NSString alloc] initWithBytes:data.imageURI.Value().data() - length:data.imageURI.Value().size() - encoding:NSUTF8StringEncoding], - @"softwareVersion" : data.softwareVersion.HasValue() == false - ? [NSNull null] - : [NSNumber numberWithUnsignedLong:data.softwareVersion.Value()], - @"softwareVersionString" : data.softwareVersionString.HasValue() == false - ? [NSNull null] - : [[NSString alloc] initWithBytes:data.softwareVersionString.Value().data() - length:data.softwareVersionString.Value().size() - encoding:NSUTF8StringEncoding], - @"updateToken" : data.updateToken.HasValue() == false ? [NSNull null] - : [NSData dataWithBytes:data.updateToken.Value().data() - length:data.updateToken.Value().size()], - @"userConsentNeeded" : data.userConsentNeeded.HasValue() == false - ? [NSNull null] - : [NSNumber numberWithBool:data.userConsentNeeded.Value()], - @"metadataForRequestor" : data.metadataForRequestor.HasValue() == false - ? [NSNull null] - : [NSData dataWithBytes:data.metadataForRequestor.Value().data() length:data.metadataForRequestor.Value().size()], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + if (data.delayedActionTime.HasValue()) { + value = [NSNumber numberWithUnsignedInt:data.delayedActionTime.Value()]; + } else { + value = [NSNull null]; + } + response[@"DelayedActionTime"] = value; + } + { + id value; + if (data.imageURI.HasValue()) { + value = [[NSString alloc] initWithBytes:data.imageURI.Value().data() + length:data.imageURI.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + value = [NSNull null]; + } + response[@"ImageURI"] = value; + } + { + id value; + if (data.softwareVersion.HasValue()) { + value = [NSNumber numberWithUnsignedInt:data.softwareVersion.Value()]; + } else { + value = [NSNull null]; + } + response[@"SoftwareVersion"] = value; + } + { + id value; + if (data.softwareVersionString.HasValue()) { + value = [[NSString alloc] initWithBytes:data.softwareVersionString.Value().data() + length:data.softwareVersionString.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + value = [NSNull null]; + } + response[@"SoftwareVersionString"] = value; + } + { + id value; + if (data.updateToken.HasValue()) { + value = [NSData dataWithBytes:data.updateToken.Value().data() length:data.updateToken.Value().size()]; + } else { + value = [NSNull null]; + } + response[@"UpdateToken"] = value; + } + { + id value; + if (data.userConsentNeeded.HasValue()) { + value = [NSNumber numberWithBool:data.userConsentNeeded.Value()]; + } else { + value = [NSNull null]; + } + response[@"UserConsentNeeded"] = value; + } + { + id value; + if (data.metadataForRequestor.HasValue()) { + value = [NSData dataWithBytes:data.metadataForRequestor.Value().data() length:data.metadataForRequestor.Value().size()]; + } else { + value = [NSNull null]; + } + response[@"MetadataForRequestor"] = value; + } DispatchSuccess(context, response); }; void CHIPOperationalCredentialsClusterAttestationResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & data) { - id response = @ { - @"AttestationElements" : [NSData dataWithBytes:data.attestationElements.data() length:data.attestationElements.size()], - @"Signature" : [NSData dataWithBytes:data.signature.data() length:data.signature.size()], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSData dataWithBytes:data.attestationElements.data() length:data.attestationElements.size()]; + response[@"AttestationElements"] = value; + } + { + id value; + value = [NSData dataWithBytes:data.signature.data() length:data.signature.size()]; + response[@"Signature"] = value; + } DispatchSuccess(context, response); }; void CHIPOperationalCredentialsClusterCertificateChainResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & data) { - id response = @ { - @"Certificate" : [NSData dataWithBytes:data.certificate.data() length:data.certificate.size()], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSData dataWithBytes:data.certificate.data() length:data.certificate.size()]; + response[@"Certificate"] = value; + } DispatchSuccess(context, response); }; void CHIPOperationalCredentialsClusterNOCResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & data) { - id response = @ { - @"StatusCode" : [NSNumber numberWithUnsignedChar:data.statusCode], - @"FabricIndex" : [NSNumber numberWithUnsignedChar:data.fabricIndex], - @"DebugText" : [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.statusCode]; + response[@"StatusCode"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.fabricIndex]; + response[@"FabricIndex"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.debugText.data() length:data.debugText.size() encoding:NSUTF8StringEncoding]; + response[@"DebugText"] = value; + } DispatchSuccess(context, response); }; void CHIPOperationalCredentialsClusterOpCSRResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::OperationalCredentials::Commands::OpCSRResponse::DecodableType & data) { - id response = @ { - @"NOCSRElements" : [NSData dataWithBytes:data.NOCSRElements.data() length:data.NOCSRElements.size()], - @"AttestationSignature" : [NSData dataWithBytes:data.attestationSignature.data() length:data.attestationSignature.size()], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSData dataWithBytes:data.NOCSRElements.data() length:data.NOCSRElements.size()]; + response[@"NOCSRElements"] = value; + } + { + id value; + value = [NSData dataWithBytes:data.attestationSignature.data() length:data.attestationSignature.size()]; + response[@"AttestationSignature"] = value; + } DispatchSuccess(context, response); }; void CHIPScenesClusterAddSceneResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"groupId" : [NSNumber numberWithUnsignedShort:data.groupId], - @"sceneId" : [NSNumber numberWithUnsignedChar:data.sceneId], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.groupId]; + response[@"GroupId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.sceneId]; + response[@"SceneId"] = value; + } DispatchSuccess(context, response); }; void CHIPScenesClusterGetSceneMembershipResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"capacity" : [NSNumber numberWithUnsignedChar:data.capacity], - @"groupId" : [NSNumber numberWithUnsignedShort:data.groupId], - @"sceneCount" : [NSNumber numberWithUnsignedChar:data.sceneCount], - @"sceneList" : [NSNull null], /* Array - Conversion from this type to Objc is not properly implemented yet */ - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.capacity]; + response[@"Capacity"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.groupId]; + response[@"GroupId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.sceneCount]; + response[@"SceneCount"] = value; + } + { + id value; + value = [[NSMutableArray alloc] init]; + auto iter = data.sceneList.begin(); + while (iter.Next()) { + auto & entry = iter.GetValue(); + auto * newElement = [[NSNumber alloc] init]; + newElement = [NSNumber numberWithUnsignedChar:entry]; + [value addObject:newElement]; + } + if (iter.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + response[@"SceneList"] = value; + } DispatchSuccess(context, response); }; void CHIPScenesClusterRemoveAllScenesResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"groupId" : [NSNumber numberWithUnsignedShort:data.groupId], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.groupId]; + response[@"GroupId"] = value; + } DispatchSuccess(context, response); }; void CHIPScenesClusterRemoveSceneResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"groupId" : [NSNumber numberWithUnsignedShort:data.groupId], - @"sceneId" : [NSNumber numberWithUnsignedChar:data.sceneId], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.groupId]; + response[@"GroupId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.sceneId]; + response[@"SceneId"] = value; + } DispatchSuccess(context, response); }; void CHIPScenesClusterStoreSceneResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"groupId" : [NSNumber numberWithUnsignedShort:data.groupId], - @"sceneId" : [NSNumber numberWithUnsignedChar:data.sceneId], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.groupId]; + response[@"GroupId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.sceneId]; + response[@"SceneId"] = value; + } DispatchSuccess(context, response); }; void CHIPScenesClusterViewSceneResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"groupId" : [NSNumber numberWithUnsignedShort:data.groupId], - @"sceneId" : [NSNumber numberWithUnsignedChar:data.sceneId], - @"transitionTime" : [NSNumber numberWithUnsignedShort:data.transitionTime], - @"sceneName" : [[NSString alloc] initWithBytes:data.sceneName.data() - length:data.sceneName.size() - encoding:NSUTF8StringEncoding], - @"extensionFieldSets" : [NSNull null], /* Array - Conversion from this type to Objc is not properly implemented yet */ - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.groupId]; + response[@"GroupId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.sceneId]; + response[@"SceneId"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedShort:data.transitionTime]; + response[@"TransitionTime"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.sceneName.data() length:data.sceneName.size() encoding:NSUTF8StringEncoding]; + response[@"SceneName"] = value; + } + { + id value; + value = [[NSMutableArray alloc] init]; + auto iter = data.extensionFieldSets.begin(); + while (iter.Next()) { + auto & entry = iter.GetValue(); + auto * newElement = [[CHIPScenesClusterSceneExtensionFieldSet alloc] init]; + newElement.ClusterId = [NSNumber numberWithUnsignedInt:entry.clusterId]; + newElement.Length = [NSNumber numberWithUnsignedChar:entry.length]; + newElement.Value = [NSNumber numberWithUnsignedChar:entry.value]; + [value addObject:newElement]; + } + if (iter.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + response[@"ExtensionFieldSets"] = value; + } DispatchSuccess(context, response); }; void CHIPTvChannelClusterChangeChannelResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TvChannel::Commands::ChangeChannelResponse::DecodableType & data) { - id response = @ { - @"ChannelMatch" : [NSNull null], /* Array - Conversion from this type to Objc is not properly implemented yet */ - @"ErrorType" : [NSNumber numberWithUnsignedChar:data.errorType], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [[NSMutableArray alloc] init]; + auto iter = data.channelMatch.begin(); + while (iter.Next()) { + auto & entry = iter.GetValue(); + auto * newElement = [[CHIPTvChannelClusterTvChannelInfo alloc] init]; + newElement.MajorNumber = [NSNumber numberWithUnsignedShort:entry.majorNumber]; + newElement.MinorNumber = [NSNumber numberWithUnsignedShort:entry.minorNumber]; + newElement.Name = [[NSString alloc] initWithBytes:entry.name.data() + length:entry.name.size() + encoding:NSUTF8StringEncoding]; + newElement.CallSign = [[NSString alloc] initWithBytes:entry.callSign.data() + length:entry.callSign.size() + encoding:NSUTF8StringEncoding]; + newElement.AffiliateCallSign = [[NSString alloc] initWithBytes:entry.affiliateCallSign.data() + length:entry.affiliateCallSign.size() + encoding:NSUTF8StringEncoding]; + [value addObject:newElement]; + } + if (iter.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + response[@"ChannelMatch"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.errorType]; + response[@"ErrorType"] = value; + } DispatchSuccess(context, response); }; void CHIPTargetNavigatorClusterNavigateTargetResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data) { - id response = @ { - @"status" : [NSNumber numberWithUnsignedChar:data.status], - @"data" : [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.status]; + response[@"Status"] = value; + } + { + id value; + value = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; + response[@"Data"] = value; + } DispatchSuccess(context, response); }; void CHIPTestClusterClusterBooleanResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType & data) { - id response = @ { - @"value" : [NSNumber numberWithBool:data.value], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithBool:data.value]; + response[@"Value"] = value; + } DispatchSuccess(context, response); }; void CHIPTestClusterClusterTestAddArgumentsResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType & data) { - id response = @ { - @"returnValue" : [NSNumber numberWithUnsignedChar:data.returnValue], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.returnValue]; + response[@"ReturnValue"] = value; + } DispatchSuccess(context, response); }; void CHIPTestClusterClusterTestEnumsResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data) { - id response = @ { - @"arg1" : [NSNumber numberWithUnsignedShort:data.arg1], - @"arg2" : [NSNumber numberWithUnsignedChar:data.arg2], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedShort:data.arg1]; + response[@"Arg1"] = value; + } + { + id value; + value = [NSNumber numberWithUnsignedChar:data.arg2]; + response[@"Arg2"] = value; + } DispatchSuccess(context, response); }; void CHIPTestClusterClusterTestListInt8UReverseResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType & data) { - id response = @ { - @"arg1" : [NSNull null], /* Array - Conversion from this type to Objc is not properly implemented yet */ - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [[NSMutableArray alloc] init]; + auto iter = data.arg1.begin(); + while (iter.Next()) { + auto & entry = iter.GetValue(); + auto * newElement = [[NSNumber alloc] init]; + newElement = [NSNumber numberWithUnsignedChar:entry]; + [value addObject:newElement]; + } + if (iter.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + response[@"Arg1"] = value; + } DispatchSuccess(context, response); }; void CHIPTestClusterClusterTestNullableOptionalResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType & data) { - id response = @ { - @"wasPresent" : [NSNumber numberWithBool:data.wasPresent], - @"wasNull" : data.wasNull.HasValue() == false ? [NSNull null] : [NSNumber numberWithBool:data.wasNull.Value()], - @"value" : data.value.HasValue() == false ? [NSNull null] : [NSNumber numberWithUnsignedChar:data.value.Value()], - @"originalValue" : data.originalValue.HasValue() == false - ? [NSNull null] - : data.originalValue.Value().IsNull() ? [NSNull null] - : [NSNumber numberWithUnsignedChar:data.originalValue.Value().Value()], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithBool:data.wasPresent]; + response[@"WasPresent"] = value; + } + { + id value; + if (data.wasNull.HasValue()) { + value = [NSNumber numberWithBool:data.wasNull.Value()]; + } else { + value = [NSNull null]; + } + response[@"WasNull"] = value; + } + { + id value; + if (data.value.HasValue()) { + value = [NSNumber numberWithUnsignedChar:data.value.Value()]; + } else { + value = [NSNull null]; + } + response[@"Value"] = value; + } + { + id value; + if (data.originalValue.HasValue()) { + if (data.originalValue.Value().IsNull()) { + value = [NSNull null]; + } else { + value = [NSNumber numberWithUnsignedChar:data.originalValue.Value().Value()]; + } + } else { + value = [NSNull null]; + } + response[@"OriginalValue"] = value; + } DispatchSuccess(context, response); }; void CHIPTestClusterClusterTestSpecificResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType & data) { - id response = @ { - @"returnValue" : [NSNumber numberWithUnsignedChar:data.returnValue], - }; + NSMutableDictionary * response = [[NSMutableDictionary alloc] init]; + { + id value; + value = [NSNumber numberWithUnsignedChar:data.returnValue]; + response[@"ReturnValue"] = value; + } DispatchSuccess(context, response); }; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 6811abb84188ad..6e45706c3bb6d3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -23,6 +23,7 @@ #import #include +#include typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values); @@ -34,8 +35,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPAccountLogin : CHIPCluster -- (void)getSetupPIN:(NSString *)tempAccountIdentifier responseHandler:(ResponseHandler)responseHandler; -- (void)login:(NSString *)tempAccountIdentifier setupPIN:(NSString *)setupPIN responseHandler:(ResponseHandler)responseHandler; +- (void)getSetupPIN:(CHIPAccountLoginClusterGetSetupPINPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)login:(CHIPAccountLoginClusterLoginPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler; @@ -47,15 +48,12 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPAdministratorCommissioning : CHIPCluster -- (void)openBasicCommissioningWindow:(uint16_t)commissioningTimeout responseHandler:(ResponseHandler)responseHandler; -- (void)openCommissioningWindow:(uint16_t)commissioningTimeout - PAKEVerifier:(NSData *)PAKEVerifier - discriminator:(uint16_t)discriminator - iterations:(uint32_t)iterations - salt:(NSData *)salt - passcodeID:(uint16_t)passcodeID +- (void)openBasicCommissioningWindow:(CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)openCommissioningWindow:(CHIPAdministratorCommissioningClusterOpenCommissioningWindowPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)revokeCommissioning:(ResponseHandler)responseHandler; +- (void)revokeCommissioning:(CHIPAdministratorCommissioningClusterRevokeCommissioningPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler; @@ -67,7 +65,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPApplicationBasic : CHIPCluster -- (void)changeStatus:(uint8_t)status responseHandler:(ResponseHandler)responseHandler; +- (void)changeStatus:(CHIPApplicationBasicClusterChangeStatusPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeVendorNameWithResponseHandler:(ResponseHandler)responseHandler; @@ -93,9 +92,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPApplicationLauncher : CHIPCluster -- (void)launchApp:(NSString *)data - catalogVendorId:(uint16_t)catalogVendorId - applicationId:(NSString *)applicationId +- (void)launchApp:(CHIPApplicationLauncherClusterLaunchAppPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeApplicationLauncherListWithResponseHandler:(ResponseHandler)responseHandler; @@ -114,8 +111,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPAudioOutput : CHIPCluster -- (void)renameOutput:(uint8_t)index name:(NSString *)name responseHandler:(ResponseHandler)responseHandler; -- (void)selectOutput:(uint8_t)index responseHandler:(ResponseHandler)responseHandler; +- (void)renameOutput:(CHIPAudioOutputClusterRenameOutputPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)selectOutput:(CHIPAudioOutputClusterSelectOutputPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeAudioOutputListWithResponseHandler:(ResponseHandler)responseHandler; @@ -131,8 +128,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPBarrierControl : CHIPCluster -- (void)barrierControlGoToPercent:(uint8_t)percentOpen responseHandler:(ResponseHandler)responseHandler; -- (void)barrierControlStop:(ResponseHandler)responseHandler; +- (void)barrierControlGoToPercent:(CHIPBarrierControlClusterBarrierControlGoToPercentPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)barrierControlStop:(CHIPBarrierControlClusterBarrierControlStopPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeBarrierMovingStateWithResponseHandler:(ResponseHandler)responseHandler; @@ -152,7 +151,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPBasic : CHIPCluster -- (void)mfgSpecificPing:(ResponseHandler)responseHandler; +- (void)mfgSpecificPing:(CHIPBasicClusterMfgSpecificPingPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeInteractionModelVersionWithResponseHandler:(ResponseHandler)responseHandler; @@ -229,16 +228,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPBinding : CHIPCluster -- (void)bind:(uint64_t)nodeId - groupId:(uint16_t)groupId - endpointId:(uint16_t)endpointId - clusterId:(uint32_t)clusterId - responseHandler:(ResponseHandler)responseHandler; -- (void)unbind:(uint64_t)nodeId - groupId:(uint16_t)groupId - endpointId:(uint16_t)endpointId - clusterId:(uint32_t)clusterId - responseHandler:(ResponseHandler)responseHandler; +- (void)bind:(CHIPBindingClusterBindPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)unbind:(CHIPBindingClusterUnbindPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler; @@ -266,33 +257,29 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPBridgedActions : CHIPCluster -- (void)disableAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; -- (void)disableActionWithDuration:(uint16_t)actionID - invokeID:(uint32_t)invokeID - duration:(uint32_t)duration +- (void)disableAction:(CHIPBridgedActionsClusterDisableActionPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)disableActionWithDuration:(CHIPBridgedActionsClusterDisableActionWithDurationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)enableAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; -- (void)enableActionWithDuration:(uint16_t)actionID - invokeID:(uint32_t)invokeID - duration:(uint32_t)duration +- (void)enableAction:(CHIPBridgedActionsClusterEnableActionPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)enableActionWithDuration:(CHIPBridgedActionsClusterEnableActionWithDurationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)instantAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; -- (void)instantActionWithTransition:(uint16_t)actionID - invokeID:(uint32_t)invokeID - transitionTime:(uint16_t)transitionTime +- (void)instantAction:(CHIPBridgedActionsClusterInstantActionPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)instantActionWithTransition:(CHIPBridgedActionsClusterInstantActionWithTransitionPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)pauseAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; -- (void)pauseActionWithDuration:(uint16_t)actionID - invokeID:(uint32_t)invokeID - duration:(uint32_t)duration +- (void)pauseAction:(CHIPBridgedActionsClusterPauseActionPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)pauseActionWithDuration:(CHIPBridgedActionsClusterPauseActionWithDurationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)resumeAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; -- (void)startAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; -- (void)startActionWithDuration:(uint16_t)actionID - invokeID:(uint32_t)invokeID - duration:(uint32_t)duration +- (void)resumeAction:(CHIPBridgedActionsClusterResumeActionPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)startAction:(CHIPBridgedActionsClusterStartActionPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)startActionWithDuration:(CHIPBridgedActionsClusterStartActionWithDurationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)stopAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; +- (void)stopAction:(CHIPBridgedActionsClusterStopActionPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeActionListWithResponseHandler:(ResponseHandler)responseHandler; @@ -349,114 +336,38 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPColorControl : CHIPCluster -- (void)colorLoopSet:(uint8_t)updateFlags - action:(uint8_t)action - direction:(uint8_t)direction - time:(uint16_t)time - startHue:(uint16_t)startHue - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)colorLoopSet:(CHIPColorControlClusterColorLoopSetPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)enhancedMoveHue:(uint8_t)moveMode - rate:(uint16_t)rate - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)enhancedMoveHue:(CHIPColorControlClusterEnhancedMoveHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)enhancedMoveToHue:(uint16_t)enhancedHue - direction:(uint8_t)direction - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)enhancedMoveToHue:(CHIPColorControlClusterEnhancedMoveToHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)enhancedMoveToHueAndSaturation:(uint16_t)enhancedHue - saturation:(uint8_t)saturation - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)enhancedMoveToHueAndSaturation:(CHIPColorControlClusterEnhancedMoveToHueAndSaturationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)enhancedStepHue:(uint8_t)stepMode - stepSize:(uint16_t)stepSize - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)enhancedStepHue:(CHIPColorControlClusterEnhancedStepHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)moveColor:(int16_t)rateX - rateY:(int16_t)rateY - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler; -- (void)moveColorTemperature:(uint8_t)moveMode - rate:(uint16_t)rate - colorTemperatureMinimum:(uint16_t)colorTemperatureMinimum - colorTemperatureMaximum:(uint16_t)colorTemperatureMaximum - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)moveColor:(CHIPColorControlClusterMoveColorPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)moveColorTemperature:(CHIPColorControlClusterMoveColorTemperaturePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)moveHue:(uint8_t)moveMode - rate:(uint8_t)rate - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler; -- (void)moveSaturation:(uint8_t)moveMode - rate:(uint8_t)rate - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)moveHue:(CHIPColorControlClusterMoveHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)moveSaturation:(CHIPColorControlClusterMoveSaturationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)moveToColor:(uint16_t)colorX - colorY:(uint16_t)colorY - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler; -- (void)moveToColorTemperature:(uint16_t)colorTemperature - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)moveToColor:(CHIPColorControlClusterMoveToColorPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)moveToColorTemperature:(CHIPColorControlClusterMoveToColorTemperaturePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)moveToHue:(uint8_t)hue - direction:(uint8_t)direction - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler; -- (void)moveToHueAndSaturation:(uint8_t)hue - saturation:(uint8_t)saturation - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)moveToHue:(CHIPColorControlClusterMoveToHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)moveToHueAndSaturation:(CHIPColorControlClusterMoveToHueAndSaturationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)moveToSaturation:(uint8_t)saturation - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)moveToSaturation:(CHIPColorControlClusterMoveToSaturationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)stepColor:(int16_t)stepX - stepY:(int16_t)stepY - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler; -- (void)stepColorTemperature:(uint8_t)stepMode - stepSize:(uint16_t)stepSize - transitionTime:(uint16_t)transitionTime - colorTemperatureMinimum:(uint16_t)colorTemperatureMinimum - colorTemperatureMaximum:(uint16_t)colorTemperatureMaximum - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)stepColor:(CHIPColorControlClusterStepColorPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)stepColorTemperature:(CHIPColorControlClusterStepColorTemperaturePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)stepHue:(uint8_t)stepMode - stepSize:(uint8_t)stepSize - transitionTime:(uint8_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler; -- (void)stepSaturation:(uint8_t)stepMode - stepSize:(uint8_t)stepSize - transitionTime:(uint8_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)stepHue:(CHIPColorControlClusterStepHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)stepSaturation:(CHIPColorControlClusterStepSaturationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)stopMoveStep:(uint8_t)optionsMask optionsOverride:(uint8_t)optionsOverride responseHandler:(ResponseHandler)responseHandler; +- (void)stopMoveStep:(CHIPColorControlClusterStopMoveStepPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeCurrentHueWithResponseHandler:(ResponseHandler)responseHandler; - (void)subscribeAttributeCurrentHueWithMinInterval:(uint16_t)minInterval @@ -605,8 +516,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPContentLauncher : CHIPCluster -- (void)launchContent:(bool)autoPlay data:(NSString *)data responseHandler:(ResponseHandler)responseHandler; -- (void)launchURL:(NSString *)contentURL displayString:(NSString *)displayString responseHandler:(ResponseHandler)responseHandler; +- (void)launchContent:(CHIPContentLauncherClusterLaunchContentPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)launchURL:(CHIPContentLauncherClusterLaunchURLPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeAcceptsHeaderListWithResponseHandler:(ResponseHandler)responseHandler; @@ -640,9 +552,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPDiagnosticLogs : CHIPCluster -- (void)retrieveLogsRequest:(uint8_t)intent - requestedProtocol:(uint8_t)requestedProtocol - transferFileDesignator:(NSData *)transferFileDesignator +- (void)retrieveLogsRequest:(CHIPDiagnosticLogsClusterRetrieveLogsRequestPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; @end @@ -653,52 +563,39 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPDoorLock : CHIPCluster -- (void)clearAllPins:(ResponseHandler)responseHandler; -- (void)clearAllRfids:(ResponseHandler)responseHandler; -- (void)clearHolidaySchedule:(uint8_t)scheduleId responseHandler:(ResponseHandler)responseHandler; -- (void)clearPin:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler; -- (void)clearRfid:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler; -- (void)clearWeekdaySchedule:(uint8_t)scheduleId userId:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler; -- (void)clearYeardaySchedule:(uint8_t)scheduleId userId:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler; -- (void)getHolidaySchedule:(uint8_t)scheduleId responseHandler:(ResponseHandler)responseHandler; -- (void)getLogRecord:(uint16_t)logIndex responseHandler:(ResponseHandler)responseHandler; -- (void)getPin:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler; -- (void)getRfid:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler; -- (void)getUserType:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler; -- (void)getWeekdaySchedule:(uint8_t)scheduleId userId:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler; -- (void)getYeardaySchedule:(uint8_t)scheduleId userId:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler; -- (void)lockDoor:(NSData *)pin responseHandler:(ResponseHandler)responseHandler; -- (void)setHolidaySchedule:(uint8_t)scheduleId - localStartTime:(uint32_t)localStartTime - localEndTime:(uint32_t)localEndTime - operatingModeDuringHoliday:(uint8_t)operatingModeDuringHoliday - responseHandler:(ResponseHandler)responseHandler; -- (void)setPin:(uint16_t)userId - userStatus:(uint8_t)userStatus - userType:(uint8_t)userType - pin:(NSData *)pin - responseHandler:(ResponseHandler)responseHandler; -- (void)setRfid:(uint16_t)userId - userStatus:(uint8_t)userStatus - userType:(uint8_t)userType - id:(NSData *)id - responseHandler:(ResponseHandler)responseHandler; -- (void)setUserType:(uint16_t)userId userType:(uint8_t)userType responseHandler:(ResponseHandler)responseHandler; -- (void)setWeekdaySchedule:(uint8_t)scheduleId - userId:(uint16_t)userId - daysMask:(uint8_t)daysMask - startHour:(uint8_t)startHour - startMinute:(uint8_t)startMinute - endHour:(uint8_t)endHour - endMinute:(uint8_t)endMinute +- (void)clearAllPins:(CHIPDoorLockClusterClearAllPinsPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)clearAllRfids:(CHIPDoorLockClusterClearAllRfidsPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)clearHolidaySchedule:(CHIPDoorLockClusterClearHolidaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)clearPin:(CHIPDoorLockClusterClearPinPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)clearRfid:(CHIPDoorLockClusterClearRfidPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)clearWeekdaySchedule:(CHIPDoorLockClusterClearWeekdaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)clearYeardaySchedule:(CHIPDoorLockClusterClearYeardaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)getHolidaySchedule:(CHIPDoorLockClusterGetHolidaySchedulePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)setYeardaySchedule:(uint8_t)scheduleId - userId:(uint16_t)userId - localStartTime:(uint32_t)localStartTime - localEndTime:(uint32_t)localEndTime +- (void)getLogRecord:(CHIPDoorLockClusterGetLogRecordPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)getPin:(CHIPDoorLockClusterGetPinPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)getRfid:(CHIPDoorLockClusterGetRfidPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)getUserType:(CHIPDoorLockClusterGetUserTypePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)getWeekdaySchedule:(CHIPDoorLockClusterGetWeekdaySchedulePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)unlockDoor:(NSData *)pin responseHandler:(ResponseHandler)responseHandler; -- (void)unlockWithTimeout:(uint16_t)timeoutInSeconds pin:(NSData *)pin responseHandler:(ResponseHandler)responseHandler; +- (void)getYeardaySchedule:(CHIPDoorLockClusterGetYeardaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)lockDoor:(CHIPDoorLockClusterLockDoorPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)setHolidaySchedule:(CHIPDoorLockClusterSetHolidaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)setPin:(CHIPDoorLockClusterSetPinPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)setRfid:(CHIPDoorLockClusterSetRfidPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)setUserType:(CHIPDoorLockClusterSetUserTypePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)setWeekdaySchedule:(CHIPDoorLockClusterSetWeekdaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)setYeardaySchedule:(CHIPDoorLockClusterSetYeardaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)unlockDoor:(CHIPDoorLockClusterUnlockDoorPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)unlockWithTimeout:(CHIPDoorLockClusterUnlockWithTimeoutPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeLockStateWithResponseHandler:(ResponseHandler)responseHandler; - (void)subscribeAttributeLockStateWithMinInterval:(uint16_t)minInterval @@ -752,7 +649,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPEthernetNetworkDiagnostics : CHIPCluster -- (void)resetCounts:(ResponseHandler)responseHandler; +- (void)resetCounts:(CHIPEthernetNetworkDiagnosticsClusterResetCountsPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributePHYRateWithResponseHandler:(ResponseHandler)responseHandler; @@ -812,15 +710,11 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPGeneralCommissioning : CHIPCluster -- (void)armFailSafe:(uint16_t)expiryLengthSeconds - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)armFailSafe:(CHIPGeneralCommissioningClusterArmFailSafePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)commissioningComplete:(ResponseHandler)responseHandler; -- (void)setRegulatoryConfig:(uint8_t)location - countryCode:(NSString *)countryCode - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)commissioningComplete:(CHIPGeneralCommissioningClusterCommissioningCompletePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)setRegulatoryConfig:(CHIPGeneralCommissioningClusterSetRegulatoryConfigPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeBreadcrumbWithResponseHandler:(ResponseHandler)responseHandler; @@ -872,12 +766,15 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPGroups : CHIPCluster -- (void)addGroup:(uint16_t)groupId groupName:(NSString *)groupName responseHandler:(ResponseHandler)responseHandler; -- (void)addGroupIfIdentifying:(uint16_t)groupId groupName:(NSString *)groupName responseHandler:(ResponseHandler)responseHandler; -- (void)getGroupMembership:(uint8_t)groupCount groupList:(uint16_t)groupList responseHandler:(ResponseHandler)responseHandler; -- (void)removeAllGroups:(ResponseHandler)responseHandler; -- (void)removeGroup:(uint16_t)groupId responseHandler:(ResponseHandler)responseHandler; -- (void)viewGroup:(uint16_t)groupId responseHandler:(ResponseHandler)responseHandler; +- (void)addGroup:(CHIPGroupsClusterAddGroupPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)addGroupIfIdentifying:(CHIPGroupsClusterAddGroupIfIdentifyingPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)getGroupMembership:(CHIPGroupsClusterGetGroupMembershipPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)removeAllGroups:(CHIPGroupsClusterRemoveAllGroupsPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)removeGroup:(CHIPGroupsClusterRemoveGroupPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)viewGroup:(CHIPGroupsClusterViewGroupPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeNameSupportWithResponseHandler:(ResponseHandler)responseHandler; @@ -891,11 +788,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPIdentify : CHIPCluster -- (void)identify:(uint16_t)identifyTime responseHandler:(ResponseHandler)responseHandler; -- (void)identifyQuery:(ResponseHandler)responseHandler; -- (void)triggerEffect:(uint8_t)effectIdentifier - effectVariant:(uint8_t)effectVariant - responseHandler:(ResponseHandler)responseHandler; +- (void)identify:(CHIPIdentifyClusterIdentifyPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)identifyQuery:(CHIPIdentifyClusterIdentifyQueryPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)triggerEffect:(CHIPIdentifyClusterTriggerEffectPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeIdentifyTimeWithResponseHandler:(ResponseHandler)responseHandler; - (void)writeAttributeIdentifyTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; @@ -936,7 +831,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPKeypadInput : CHIPCluster -- (void)sendKey:(uint8_t)keyCode responseHandler:(ResponseHandler)responseHandler; +- (void)sendKey:(CHIPKeypadInputClusterSendKeyPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler; @@ -948,32 +843,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPLevelControl : CHIPCluster -- (void)move:(uint8_t)moveMode - rate:(uint8_t)rate - optionMask:(uint8_t)optionMask - optionOverride:(uint8_t)optionOverride - responseHandler:(ResponseHandler)responseHandler; -- (void)moveToLevel:(uint8_t)level - transitionTime:(uint16_t)transitionTime - optionMask:(uint8_t)optionMask - optionOverride:(uint8_t)optionOverride - responseHandler:(ResponseHandler)responseHandler; -- (void)moveToLevelWithOnOff:(uint8_t)level - transitionTime:(uint16_t)transitionTime +- (void)move:(CHIPLevelControlClusterMovePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)moveToLevel:(CHIPLevelControlClusterMoveToLevelPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)moveToLevelWithOnOff:(CHIPLevelControlClusterMoveToLevelWithOnOffPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)moveWithOnOff:(uint8_t)moveMode rate:(uint8_t)rate responseHandler:(ResponseHandler)responseHandler; -- (void)step:(uint8_t)stepMode - stepSize:(uint8_t)stepSize - transitionTime:(uint16_t)transitionTime - optionMask:(uint8_t)optionMask - optionOverride:(uint8_t)optionOverride - responseHandler:(ResponseHandler)responseHandler; -- (void)stepWithOnOff:(uint8_t)stepMode - stepSize:(uint8_t)stepSize - transitionTime:(uint16_t)transitionTime +- (void)moveWithOnOff:(CHIPLevelControlClusterMoveWithOnOffPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)step:(CHIPLevelControlClusterStepPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)stepWithOnOff:(CHIPLevelControlClusterStepWithOnOffPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)stop:(CHIPLevelControlClusterStopPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)stopWithOnOff:(CHIPLevelControlClusterStopWithOnOffPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)stop:(uint8_t)optionMask optionOverride:(uint8_t)optionOverride responseHandler:(ResponseHandler)responseHandler; -- (void)stopWithOnOff:(ResponseHandler)responseHandler; - (void)readAttributeCurrentLevelWithResponseHandler:(ResponseHandler)responseHandler; - (void)subscribeAttributeCurrentLevelWithMinInterval:(uint16_t)minInterval @@ -1024,7 +905,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPLowPower : CHIPCluster -- (void)sleep:(ResponseHandler)responseHandler; +- (void)sleep:(CHIPLowPowerClusterSleepPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler; @@ -1036,10 +917,12 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPMediaInput : CHIPCluster -- (void)hideInputStatus:(ResponseHandler)responseHandler; -- (void)renameInput:(uint8_t)index name:(NSString *)name responseHandler:(ResponseHandler)responseHandler; -- (void)selectInput:(uint8_t)index responseHandler:(ResponseHandler)responseHandler; -- (void)showInputStatus:(ResponseHandler)responseHandler; +- (void)hideInputStatus:(CHIPMediaInputClusterHideInputStatusPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)renameInput:(CHIPMediaInputClusterRenameInputPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)selectInput:(CHIPMediaInputClusterSelectInputPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)showInputStatus:(CHIPMediaInputClusterShowInputStatusPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeMediaInputListWithResponseHandler:(ResponseHandler)responseHandler; @@ -1055,17 +938,22 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPMediaPlayback : CHIPCluster -- (void)mediaFastForward:(ResponseHandler)responseHandler; -- (void)mediaNext:(ResponseHandler)responseHandler; -- (void)mediaPause:(ResponseHandler)responseHandler; -- (void)mediaPlay:(ResponseHandler)responseHandler; -- (void)mediaPrevious:(ResponseHandler)responseHandler; -- (void)mediaRewind:(ResponseHandler)responseHandler; -- (void)mediaSeek:(uint64_t)position responseHandler:(ResponseHandler)responseHandler; -- (void)mediaSkipBackward:(uint64_t)deltaPositionMilliseconds responseHandler:(ResponseHandler)responseHandler; -- (void)mediaSkipForward:(uint64_t)deltaPositionMilliseconds responseHandler:(ResponseHandler)responseHandler; -- (void)mediaStartOver:(ResponseHandler)responseHandler; -- (void)mediaStop:(ResponseHandler)responseHandler; +- (void)mediaFastForward:(CHIPMediaPlaybackClusterMediaFastForwardPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)mediaNext:(CHIPMediaPlaybackClusterMediaNextPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)mediaPause:(CHIPMediaPlaybackClusterMediaPausePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)mediaPlay:(CHIPMediaPlaybackClusterMediaPlayPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)mediaPrevious:(CHIPMediaPlaybackClusterMediaPreviousPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)mediaRewind:(CHIPMediaPlaybackClusterMediaRewindPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)mediaSeek:(CHIPMediaPlaybackClusterMediaSeekPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)mediaSkipBackward:(CHIPMediaPlaybackClusterMediaSkipBackwardPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)mediaSkipForward:(CHIPMediaPlaybackClusterMediaSkipForwardPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)mediaStartOver:(CHIPMediaPlaybackClusterMediaStartOverPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)mediaStop:(CHIPMediaPlaybackClusterMediaStopPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributePlaybackStateWithResponseHandler:(ResponseHandler)responseHandler; @@ -1093,7 +981,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPModeSelect : CHIPCluster -- (void)changeToMode:(uint8_t)newMode responseHandler:(ResponseHandler)responseHandler; +- (void)changeToMode:(CHIPModeSelectClusterChangeToModePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeCurrentModeWithResponseHandler:(ResponseHandler)responseHandler; - (void)subscribeAttributeCurrentModeWithMinInterval:(uint16_t)minInterval @@ -1120,39 +1008,21 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPNetworkCommissioning : CHIPCluster -- (void)addThreadNetwork:(NSData *)operationalDataset - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)addThreadNetwork:(CHIPNetworkCommissioningClusterAddThreadNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)addWiFiNetwork:(NSData *)ssid - credentials:(NSData *)credentials - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)addWiFiNetwork:(CHIPNetworkCommissioningClusterAddWiFiNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)disableNetwork:(NSData *)networkID - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)disableNetwork:(CHIPNetworkCommissioningClusterDisableNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)enableNetwork:(NSData *)networkID - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)enableNetwork:(CHIPNetworkCommissioningClusterEnableNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)removeNetwork:(NSData *)networkID - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)removeNetwork:(CHIPNetworkCommissioningClusterRemoveNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)scanNetworks:(NSData *)ssid - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)scanNetworks:(CHIPNetworkCommissioningClusterScanNetworksPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)updateThreadNetwork:(NSData *)operationalDataset - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)updateThreadNetwork:(CHIPNetworkCommissioningClusterUpdateThreadNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)updateWiFiNetwork:(NSData *)ssid - credentials:(NSData *)credentials - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)updateWiFiNetwork:(CHIPNetworkCommissioningClusterUpdateWiFiNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeFeatureMapWithResponseHandler:(ResponseHandler)responseHandler; @@ -1167,19 +1037,12 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPOtaSoftwareUpdateProvider : CHIPCluster -- (void)applyUpdateRequest:(NSData *)updateToken newVersion:(uint32_t)newVersion responseHandler:(ResponseHandler)responseHandler; -- (void)notifyUpdateApplied:(NSData *)updateToken - softwareVersion:(uint32_t)softwareVersion +- (void)applyUpdateRequest:(CHIPOtaSoftwareUpdateProviderClusterApplyUpdateRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)notifyUpdateApplied:(CHIPOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)queryImage:(uint16_t)vendorId - productId:(uint16_t)productId - softwareVersion:(uint32_t)softwareVersion - protocolsSupported:(uint8_t)protocolsSupported - hardwareVersion:(uint16_t)hardwareVersion - location:(NSString *)location - requestorCanConsent:(bool)requestorCanConsent - metadataForProvider:(NSData *)metadataForProvider - responseHandler:(ResponseHandler)responseHandler; +- (void)queryImage:(CHIPOtaSoftwareUpdateProviderClusterQueryImagePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler; @@ -1191,10 +1054,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPOtaSoftwareUpdateRequestor : CHIPCluster -- (void)announceOtaProvider:(uint64_t)providerLocation - vendorId:(uint16_t)vendorId - announcementReason:(uint8_t)announcementReason - metadataForNode:(NSData *)metadataForNode +- (void)announceOtaProvider:(CHIPOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeDefaultOtaProviderWithResponseHandler:(ResponseHandler)responseHandler; @@ -1232,15 +1092,13 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPOnOff : CHIPCluster -- (void)off:(ResponseHandler)responseHandler; -- (void)offWithEffect:(uint8_t)effectId effectVariant:(uint8_t)effectVariant responseHandler:(ResponseHandler)responseHandler; -- (void)on:(ResponseHandler)responseHandler; -- (void)onWithRecallGlobalScene:(ResponseHandler)responseHandler; -- (void)onWithTimedOff:(uint8_t)onOffControl - onTime:(uint16_t)onTime - offWaitTime:(uint16_t)offWaitTime - responseHandler:(ResponseHandler)responseHandler; -- (void)toggle:(ResponseHandler)responseHandler; +- (void)off:(CHIPOnOffClusterOffPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)offWithEffect:(CHIPOnOffClusterOffWithEffectPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)on:(CHIPOnOffClusterOnPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)onWithRecallGlobalScene:(CHIPOnOffClusterOnWithRecallGlobalScenePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)onWithTimedOff:(CHIPOnOffClusterOnWithTimedOffPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)toggle:(CHIPOnOffClusterTogglePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeOnOffWithResponseHandler:(ResponseHandler)responseHandler; - (void)subscribeAttributeOnOffWithMinInterval:(uint16_t)minInterval @@ -1286,20 +1144,23 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPOperationalCredentials : CHIPCluster -- (void)addNOC:(NSData *)NOCValue - ICACValue:(NSData *)ICACValue - IPKValue:(NSData *)IPKValue - caseAdminNode:(uint64_t)caseAdminNode - adminVendorId:(uint16_t)adminVendorId +- (void)addNOC:(CHIPOperationalCredentialsClusterAddNOCPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)addTrustedRootCertificate:(CHIPOperationalCredentialsClusterAddTrustedRootCertificatePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)attestationRequest:(CHIPOperationalCredentialsClusterAttestationRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)certificateChainRequest:(CHIPOperationalCredentialsClusterCertificateChainRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)opCSRRequest:(CHIPOperationalCredentialsClusterOpCSRRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)removeFabric:(CHIPOperationalCredentialsClusterRemoveFabricPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)removeTrustedRootCertificate:(CHIPOperationalCredentialsClusterRemoveTrustedRootCertificatePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)updateFabricLabel:(CHIPOperationalCredentialsClusterUpdateFabricLabelPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)updateNOC:(CHIPOperationalCredentialsClusterUpdateNOCPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)addTrustedRootCertificate:(NSData *)rootCertificate responseHandler:(ResponseHandler)responseHandler; -- (void)attestationRequest:(NSData *)attestationNonce responseHandler:(ResponseHandler)responseHandler; -- (void)certificateChainRequest:(uint8_t)certificateType responseHandler:(ResponseHandler)responseHandler; -- (void)opCSRRequest:(NSData *)CSRNonce responseHandler:(ResponseHandler)responseHandler; -- (void)removeFabric:(uint8_t)fabricIndex responseHandler:(ResponseHandler)responseHandler; -- (void)removeTrustedRootCertificate:(NSData *)trustedRootIdentifier responseHandler:(ResponseHandler)responseHandler; -- (void)updateFabricLabel:(NSString *)label responseHandler:(ResponseHandler)responseHandler; -- (void)updateNOC:(NSData *)NOCValue ICACValue:(NSData *)ICACValue responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeFabricsListWithResponseHandler:(ResponseHandler)responseHandler; @@ -1463,23 +1324,15 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPScenes : CHIPCluster -- (void)addScene:(uint16_t)groupId - sceneId:(uint8_t)sceneId - transitionTime:(uint16_t)transitionTime - sceneName:(NSString *)sceneName - clusterId:(uint32_t)clusterId - length:(uint8_t)length - value:(uint8_t)value - responseHandler:(ResponseHandler)responseHandler; -- (void)getSceneMembership:(uint16_t)groupId responseHandler:(ResponseHandler)responseHandler; -- (void)recallScene:(uint16_t)groupId - sceneId:(uint8_t)sceneId - transitionTime:(uint16_t)transitionTime - responseHandler:(ResponseHandler)responseHandler; -- (void)removeAllScenes:(uint16_t)groupId responseHandler:(ResponseHandler)responseHandler; -- (void)removeScene:(uint16_t)groupId sceneId:(uint8_t)sceneId responseHandler:(ResponseHandler)responseHandler; -- (void)storeScene:(uint16_t)groupId sceneId:(uint8_t)sceneId responseHandler:(ResponseHandler)responseHandler; -- (void)viewScene:(uint16_t)groupId sceneId:(uint8_t)sceneId responseHandler:(ResponseHandler)responseHandler; +- (void)addScene:(CHIPScenesClusterAddScenePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)getSceneMembership:(CHIPScenesClusterGetSceneMembershipPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)recallScene:(CHIPScenesClusterRecallScenePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)removeAllScenes:(CHIPScenesClusterRemoveAllScenesPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)removeScene:(CHIPScenesClusterRemoveScenePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)storeScene:(CHIPScenesClusterStoreScenePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)viewScene:(CHIPScenesClusterViewScenePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeSceneCountWithResponseHandler:(ResponseHandler)responseHandler; @@ -1501,7 +1354,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPSoftwareDiagnostics : CHIPCluster -- (void)resetWatermarks:(ResponseHandler)responseHandler; +- (void)resetWatermarks:(CHIPSoftwareDiagnosticsClusterResetWatermarksPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeThreadMetricsWithResponseHandler:(ResponseHandler)responseHandler; @@ -1543,11 +1397,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTvChannel : CHIPCluster -- (void)changeChannel:(NSString *)match responseHandler:(ResponseHandler)responseHandler; -- (void)changeChannelByNumber:(uint16_t)majorNumber - minorNumber:(uint16_t)minorNumber +- (void)changeChannel:(CHIPTvChannelClusterChangeChannelPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)changeChannelByNumber:(CHIPTvChannelClusterChangeChannelByNumberPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)skipChannel:(uint16_t)count responseHandler:(ResponseHandler)responseHandler; +- (void)skipChannel:(CHIPTvChannelClusterSkipChannelPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeTvChannelListWithResponseHandler:(ResponseHandler)responseHandler; @@ -1565,7 +1418,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTargetNavigator : CHIPCluster -- (void)navigateTarget:(uint8_t)target data:(NSString *)data responseHandler:(ResponseHandler)responseHandler; +- (void)navigateTarget:(CHIPTargetNavigatorClusterNavigateTargetPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeTargetNavigatorListWithResponseHandler:(ResponseHandler)responseHandler; @@ -1605,29 +1459,26 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestCluster : CHIPCluster -- (void)test:(ResponseHandler)responseHandler; -- (void)testAddArguments:(uint8_t)arg1 arg2:(uint8_t)arg2 responseHandler:(ResponseHandler)responseHandler; -- (void)testEnumsRequest:(uint16_t)arg1 arg2:(uint8_t)arg2 responseHandler:(ResponseHandler)responseHandler; -- (void)testListInt8UArgumentRequest:(uint8_t)arg1 responseHandler:(ResponseHandler)responseHandler; -- (void)testListInt8UReverseRequest:(uint8_t)arg1 responseHandler:(ResponseHandler)responseHandler; -- (void)testListStructArgumentRequest:(uint8_t)a - b:(bool)b - c:(uint8_t)c - d:(NSData *)d - e:(NSString *)e - f:(uint8_t)f +- (void)test:(CHIPTestClusterClusterTestPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)testAddArguments:(CHIPTestClusterClusterTestAddArgumentsPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)testEnumsRequest:(CHIPTestClusterClusterTestEnumsRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)testListInt8UArgumentRequest:(CHIPTestClusterClusterTestListInt8UArgumentRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)testListInt8UReverseRequest:(CHIPTestClusterClusterTestListInt8UReverseRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)testListStructArgumentRequest:(CHIPTestClusterClusterTestListStructArgumentRequestPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)testNotHandled:(ResponseHandler)responseHandler; -- (void)testNullableOptionalRequest:(uint8_t)arg1 responseHandler:(ResponseHandler)responseHandler; -- (void)testSpecific:(ResponseHandler)responseHandler; -- (void)testStructArgumentRequest:(uint8_t)a - b:(bool)b - c:(uint8_t)c - d:(NSData *)d - e:(NSString *)e - f:(uint8_t)f +- (void)testNotHandled:(CHIPTestClusterClusterTestNotHandledPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)testNullableOptionalRequest:(CHIPTestClusterClusterTestNullableOptionalRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)testSpecific:(CHIPTestClusterClusterTestSpecificPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)testStructArgumentRequest:(CHIPTestClusterClusterTestStructArgumentRequestPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)testUnknownCommand:(ResponseHandler)responseHandler; +- (void)testUnknownCommand:(CHIPTestClusterClusterTestUnknownCommandPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeBooleanWithResponseHandler:(ResponseHandler)responseHandler; - (void)writeAttributeBooleanWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler; @@ -1767,15 +1618,16 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPThermostat : CHIPCluster -- (void)clearWeeklySchedule:(ResponseHandler)responseHandler; -- (void)getRelayStatusLog:(ResponseHandler)responseHandler; -- (void)getWeeklySchedule:(uint8_t)daysToReturn modeToReturn:(uint8_t)modeToReturn responseHandler:(ResponseHandler)responseHandler; -- (void)setWeeklySchedule:(uint8_t)numberOfTransitionsForSequence - dayOfWeekForSequence:(uint8_t)dayOfWeekForSequence - modeForSequence:(uint8_t)modeForSequence - payload:(uint8_t)payload +- (void)clearWeeklySchedule:(CHIPThermostatClusterClearWeeklySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)getRelayStatusLog:(CHIPThermostatClusterGetRelayStatusLogPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)getWeeklySchedule:(CHIPThermostatClusterGetWeeklySchedulePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)setpointRaiseLower:(uint8_t)mode amount:(int8_t)amount responseHandler:(ResponseHandler)responseHandler; +- (void)setWeeklySchedule:(CHIPThermostatClusterSetWeeklySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)setpointRaiseLower:(CHIPThermostatClusterSetpointRaiseLowerPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeLocalTemperatureWithResponseHandler:(ResponseHandler)responseHandler; - (void)subscribeAttributeLocalTemperatureWithMinInterval:(uint16_t)minInterval @@ -1855,7 +1707,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPThreadNetworkDiagnostics : CHIPCluster -- (void)resetCounts:(ResponseHandler)responseHandler; +- (void)resetCounts:(CHIPThreadNetworkDiagnosticsClusterResetCountsPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeChannelWithResponseHandler:(ResponseHandler)responseHandler; @@ -2005,7 +1858,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPWiFiNetworkDiagnostics : CHIPCluster -- (void)resetCounts:(ResponseHandler)responseHandler; +- (void)resetCounts:(CHIPWiFiNetworkDiagnosticsClusterResetCountsPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeBssidWithResponseHandler:(ResponseHandler)responseHandler; @@ -2043,17 +1897,18 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPWindowCovering : CHIPCluster -- (void)downOrClose:(ResponseHandler)responseHandler; -- (void)goToLiftPercentage:(uint8_t)liftPercentageValue - liftPercent100thsValue:(uint16_t)liftPercent100thsValue +- (void)downOrClose:(CHIPWindowCoveringClusterDownOrClosePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)goToLiftPercentage:(CHIPWindowCoveringClusterGoToLiftPercentagePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)goToLiftValue:(uint16_t)liftValue responseHandler:(ResponseHandler)responseHandler; -- (void)goToTiltPercentage:(uint8_t)tiltPercentageValue - tiltPercent100thsValue:(uint16_t)tiltPercent100thsValue +- (void)goToLiftValue:(CHIPWindowCoveringClusterGoToLiftValuePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)goToTiltPercentage:(CHIPWindowCoveringClusterGoToTiltPercentagePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; -- (void)goToTiltValue:(uint16_t)tiltValue responseHandler:(ResponseHandler)responseHandler; -- (void)stopMotion:(ResponseHandler)responseHandler; -- (void)upOrOpen:(ResponseHandler)responseHandler; +- (void)goToTiltValue:(CHIPWindowCoveringClusterGoToTiltValuePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler; +- (void)stopMotion:(CHIPWindowCoveringClusterStopMotionPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; +- (void)upOrOpen:(CHIPWindowCoveringClusterUpOrOpenPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler; - (void)readAttributeTypeWithResponseHandler:(ResponseHandler)responseHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index fa790d868363f6..ba2fe53e2f884c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -22,13 +22,50 @@ #import "CHIPCallbackBridge_internal.h" #import "CHIPCluster_internal.h" #import "CHIPClustersObjc_internal.h" +#import "CHIPCommandPayloadsObjc.h" #import "CHIPDevice.h" #import "CHIPDevice_Internal.h" +#import "CHIPStructsObjc.h" + +#include +#include using chip::Callback::Callback; using chip::Callback::Cancelable; using namespace chip::app::Clusters; +template struct ListMemberTypeGetter { +}; +template struct ListMemberTypeGetter> { + // We use List in data model data structures, so consumers can + // use const data. Just grab the type with the const stripped off. + using Type = std::remove_const_t; +}; + +struct ListHolderBase { + // Just here so we can delete an instance to trigger the subclass destructor. + virtual ~ListHolderBase() {} +}; + +template struct ListHolder : ListHolderBase { + ListHolder(size_t N) { mList = new T[N]; } + ~ListHolder() { delete[] mList; } + T * mList; +}; + +struct ListFreer { + ~ListFreer() + { + for (auto listHolder : mListHolders) { + delete listHolder; + } + } + + void add(ListHolderBase * listHolder) { mListHolders.insert(listHolder); } + + std::set mListHolders; +}; + @implementation CHIPAccountLogin - (chip::Controller::ClusterBase *)getCluster @@ -36,10 +73,11 @@ @implementation CHIPAccountLogin return &_cppCluster; } -- (void)getSetupPIN:(NSString *)tempAccountIdentifier responseHandler:(ResponseHandler)responseHandler +- (void)getSetupPIN:(CHIPAccountLoginClusterGetSetupPINPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; AccountLogin::Commands::GetSetupPIN::Type request; - request.tempAccountIdentifier = [self asCharSpan:tempAccountIdentifier]; + request.tempAccountIdentifier = [self asCharSpan:payload.TempAccountIdentifier]; new CHIPAccountLoginClusterGetSetupPINResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -49,11 +87,12 @@ new CHIPAccountLoginClusterGetSetupPINResponseCallbackBridge( }); } -- (void)login:(NSString *)tempAccountIdentifier setupPIN:(NSString *)setupPIN responseHandler:(ResponseHandler)responseHandler +- (void)login:(CHIPAccountLoginClusterLoginPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; AccountLogin::Commands::Login::Type request; - request.tempAccountIdentifier = [self asCharSpan:tempAccountIdentifier]; - request.setupPIN = [self asCharSpan:setupPIN]; + request.tempAccountIdentifier = [self asCharSpan:payload.TempAccountIdentifier]; + request.setupPIN = [self asCharSpan:payload.SetupPIN]; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -78,10 +117,12 @@ @implementation CHIPAdministratorCommissioning return &_cppCluster; } -- (void)openBasicCommissioningWindow:(uint16_t)commissioningTimeout responseHandler:(ResponseHandler)responseHandler +- (void)openBasicCommissioningWindow:(CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; - request.commissioningTimeout = commissioningTimeout; + request.commissioningTimeout = payload.CommissioningTimeout.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -90,21 +131,17 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)openCommissioningWindow:(uint16_t)commissioningTimeout - PAKEVerifier:(NSData *)PAKEVerifier - discriminator:(uint16_t)discriminator - iterations:(uint32_t)iterations - salt:(NSData *)salt - passcodeID:(uint16_t)passcodeID +- (void)openCommissioningWindow:(CHIPAdministratorCommissioningClusterOpenCommissioningWindowPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; - request.commissioningTimeout = commissioningTimeout; - request.PAKEVerifier = [self asByteSpan:PAKEVerifier]; - request.discriminator = discriminator; - request.iterations = iterations; - request.salt = [self asByteSpan:salt]; - request.passcodeID = passcodeID; + request.commissioningTimeout = payload.CommissioningTimeout.unsignedShortValue; + request.PAKEVerifier = [self asByteSpan:payload.PAKEVerifier]; + request.discriminator = payload.Discriminator.unsignedShortValue; + request.iterations = payload.Iterations.unsignedIntValue; + request.salt = [self asByteSpan:payload.Salt]; + request.passcodeID = payload.PasscodeID.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -113,8 +150,10 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)revokeCommissioning:(ResponseHandler)responseHandler +- (void)revokeCommissioning:(CHIPAdministratorCommissioningClusterRevokeCommissioningPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; AdministratorCommissioning::Commands::RevokeCommissioning::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -140,10 +179,12 @@ @implementation CHIPApplicationBasic return &_cppCluster; } -- (void)changeStatus:(uint8_t)status responseHandler:(ResponseHandler)responseHandler +- (void)changeStatus:(CHIPApplicationBasicClusterChangeStatusPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ApplicationBasic::Commands::ChangeStatus::Type request; - request.status = static_cast(status); + request.status = static_cast>(payload.Status.unsignedCharValue); new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -217,15 +258,14 @@ @implementation CHIPApplicationLauncher return &_cppCluster; } -- (void)launchApp:(NSString *)data - catalogVendorId:(uint16_t)catalogVendorId - applicationId:(NSString *)applicationId +- (void)launchApp:(CHIPApplicationLauncherClusterLaunchAppPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ApplicationLauncher::Commands::LaunchApp::Type request; - request.data = [self asCharSpan:data]; - request.catalogVendorId = catalogVendorId; - request.applicationId = [self asCharSpan:applicationId]; + request.data = [self asCharSpan:payload.Data]; + request.catalogVendorId = payload.CatalogVendorId.unsignedShortValue; + request.applicationId = [self asCharSpan:payload.ApplicationId]; new CHIPApplicationLauncherClusterLaunchAppResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -273,11 +313,12 @@ @implementation CHIPAudioOutput return &_cppCluster; } -- (void)renameOutput:(uint8_t)index name:(NSString *)name responseHandler:(ResponseHandler)responseHandler +- (void)renameOutput:(CHIPAudioOutputClusterRenameOutputPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; AudioOutput::Commands::RenameOutput::Type request; - request.index = index; - request.name = [self asCharSpan:name]; + request.index = payload.Index.unsignedCharValue; + request.name = [self asCharSpan:payload.Name]; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -286,10 +327,11 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)selectOutput:(uint8_t)index responseHandler:(ResponseHandler)responseHandler +- (void)selectOutput:(CHIPAudioOutputClusterSelectOutputPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; AudioOutput::Commands::SelectOutput::Type request; - request.index = index; + request.index = payload.Index.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -329,10 +371,12 @@ @implementation CHIPBarrierControl return &_cppCluster; } -- (void)barrierControlGoToPercent:(uint8_t)percentOpen responseHandler:(ResponseHandler)responseHandler +- (void)barrierControlGoToPercent:(CHIPBarrierControlClusterBarrierControlGoToPercentPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BarrierControl::Commands::BarrierControlGoToPercent::Type request; - request.percentOpen = percentOpen; + request.percentOpen = payload.PercentOpen.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -341,8 +385,10 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)barrierControlStop:(ResponseHandler)responseHandler +- (void)barrierControlStop:(CHIPBarrierControlClusterBarrierControlStopPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BarrierControl::Commands::BarrierControlStop::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -396,8 +442,9 @@ @implementation CHIPBasic return &_cppCluster; } -- (void)mfgSpecificPing:(ResponseHandler)responseHandler +- (void)mfgSpecificPing:(CHIPBasicClusterMfgSpecificPingPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Basic::Commands::MfgSpecificPing::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -659,17 +706,14 @@ @implementation CHIPBinding return &_cppCluster; } -- (void)bind:(uint64_t)nodeId - groupId:(uint16_t)groupId - endpointId:(uint16_t)endpointId - clusterId:(uint32_t)clusterId - responseHandler:(ResponseHandler)responseHandler +- (void)bind:(CHIPBindingClusterBindPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Binding::Commands::Bind::Type request; - request.nodeId = nodeId; - request.groupId = groupId; - request.endpointId = endpointId; - request.clusterId = clusterId; + request.nodeId = payload.NodeId.unsignedLongLongValue; + request.groupId = payload.GroupId.unsignedShortValue; + request.endpointId = payload.EndpointId.unsignedShortValue; + request.clusterId = payload.ClusterId.unsignedIntValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -678,17 +722,14 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)unbind:(uint64_t)nodeId - groupId:(uint16_t)groupId - endpointId:(uint16_t)endpointId - clusterId:(uint32_t)clusterId - responseHandler:(ResponseHandler)responseHandler +- (void)unbind:(CHIPBindingClusterUnbindPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Binding::Commands::Unbind::Type request; - request.nodeId = nodeId; - request.groupId = groupId; - request.endpointId = endpointId; - request.clusterId = clusterId; + request.nodeId = payload.NodeId.unsignedLongLongValue; + request.groupId = payload.GroupId.unsignedShortValue; + request.endpointId = payload.EndpointId.unsignedShortValue; + request.clusterId = payload.ClusterId.unsignedIntValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -755,11 +796,16 @@ @implementation CHIPBridgedActions return &_cppCluster; } -- (void)disableAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +- (void)disableAction:(CHIPBridgedActionsClusterDisableActionPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::DisableAction::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -768,15 +814,17 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)disableActionWithDuration:(uint16_t)actionID - invokeID:(uint32_t)invokeID - duration:(uint32_t)duration +- (void)disableActionWithDuration:(CHIPBridgedActionsClusterDisableActionWithDurationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::DisableActionWithDuration::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); - request.duration = duration; + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } + request.duration = payload.Duration.unsignedIntValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -785,11 +833,16 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)enableAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +- (void)enableAction:(CHIPBridgedActionsClusterEnableActionPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::EnableAction::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -798,15 +851,17 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)enableActionWithDuration:(uint16_t)actionID - invokeID:(uint32_t)invokeID - duration:(uint32_t)duration +- (void)enableActionWithDuration:(CHIPBridgedActionsClusterEnableActionWithDurationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::EnableActionWithDuration::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); - request.duration = duration; + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } + request.duration = payload.Duration.unsignedIntValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -815,11 +870,16 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)instantAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +- (void)instantAction:(CHIPBridgedActionsClusterInstantActionPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::InstantAction::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -828,15 +888,17 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)instantActionWithTransition:(uint16_t)actionID - invokeID:(uint32_t)invokeID - transitionTime:(uint16_t)transitionTime +- (void)instantActionWithTransition:(CHIPBridgedActionsClusterInstantActionWithTransitionPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::InstantActionWithTransition::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); - request.transitionTime = transitionTime; + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } + request.transitionTime = payload.TransitionTime.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -845,11 +907,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)pauseAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +- (void)pauseAction:(CHIPBridgedActionsClusterPauseActionPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::PauseAction::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -858,15 +924,17 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)pauseActionWithDuration:(uint16_t)actionID - invokeID:(uint32_t)invokeID - duration:(uint32_t)duration +- (void)pauseActionWithDuration:(CHIPBridgedActionsClusterPauseActionWithDurationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::PauseActionWithDuration::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); - request.duration = duration; + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } + request.duration = payload.Duration.unsignedIntValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -875,11 +943,16 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)resumeAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +- (void)resumeAction:(CHIPBridgedActionsClusterResumeActionPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::ResumeAction::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -888,11 +961,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)startAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +- (void)startAction:(CHIPBridgedActionsClusterStartActionPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::StartAction::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -901,15 +978,17 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)startActionWithDuration:(uint16_t)actionID - invokeID:(uint32_t)invokeID - duration:(uint32_t)duration +- (void)startActionWithDuration:(CHIPBridgedActionsClusterStartActionWithDurationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::StartActionWithDuration::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); - request.duration = duration; + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } + request.duration = payload.Duration.unsignedIntValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -918,11 +997,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)stopAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +- (void)stopAction:(CHIPBridgedActionsClusterStopActionPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; BridgedActions::Commands::StopAction::Type request; - request.actionID = actionID; - request.invokeID = chip::Optional(invokeID); + request.actionID = payload.ActionID.unsignedShortValue; + if (payload.InvokeID != nil) { + auto & definedValue = request.invokeID.Emplace(); + definedValue = payload.InvokeID.unsignedIntValue; + } new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1091,23 +1174,18 @@ @implementation CHIPColorControl return &_cppCluster; } -- (void)colorLoopSet:(uint8_t)updateFlags - action:(uint8_t)action - direction:(uint8_t)direction - time:(uint16_t)time - startHue:(uint16_t)startHue - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler +- (void)colorLoopSet:(CHIPColorControlClusterColorLoopSetPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::ColorLoopSet::Type request; - request.updateFlags = static_cast(updateFlags); - request.action = static_cast(action); - request.direction = static_cast(direction); - request.time = time; - request.startHue = startHue; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.updateFlags + = static_cast>(payload.UpdateFlags.unsignedCharValue); + request.action = static_cast>(payload.Action.unsignedCharValue); + request.direction = static_cast>(payload.Direction.unsignedCharValue); + request.time = payload.Time.unsignedShortValue; + request.startHue = payload.StartHue.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1116,17 +1194,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)enhancedMoveHue:(uint8_t)moveMode - rate:(uint16_t)rate - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)enhancedMoveHue:(CHIPColorControlClusterEnhancedMoveHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::EnhancedMoveHue::Type request; - request.moveMode = static_cast(moveMode); - request.rate = rate; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.moveMode = static_cast>(payload.MoveMode.unsignedCharValue); + request.rate = payload.Rate.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1135,19 +1211,16 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)enhancedMoveToHue:(uint16_t)enhancedHue - direction:(uint8_t)direction - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)enhancedMoveToHue:(CHIPColorControlClusterEnhancedMoveToHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::EnhancedMoveToHue::Type request; - request.enhancedHue = enhancedHue; - request.direction = static_cast(direction); - request.transitionTime = transitionTime; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.enhancedHue = payload.EnhancedHue.unsignedShortValue; + request.direction = static_cast>(payload.Direction.unsignedCharValue); + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1156,19 +1229,16 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)enhancedMoveToHueAndSaturation:(uint16_t)enhancedHue - saturation:(uint8_t)saturation - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)enhancedMoveToHueAndSaturation:(CHIPColorControlClusterEnhancedMoveToHueAndSaturationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; - request.enhancedHue = enhancedHue; - request.saturation = saturation; - request.transitionTime = transitionTime; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.enhancedHue = payload.EnhancedHue.unsignedShortValue; + request.saturation = payload.Saturation.unsignedCharValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1177,19 +1247,16 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)enhancedStepHue:(uint8_t)stepMode - stepSize:(uint16_t)stepSize - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)enhancedStepHue:(CHIPColorControlClusterEnhancedStepHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::EnhancedStepHue::Type request; - request.stepMode = static_cast(stepMode); - request.stepSize = stepSize; - request.transitionTime = transitionTime; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.stepMode = static_cast>(payload.StepMode.unsignedCharValue); + request.stepSize = payload.StepSize.unsignedShortValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1198,17 +1265,14 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveColor:(int16_t)rateX - rateY:(int16_t)rateY - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler +- (void)moveColor:(CHIPColorControlClusterMoveColorPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::MoveColor::Type request; - request.rateX = rateX; - request.rateY = rateY; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.rateX = payload.RateX.shortValue; + request.rateY = payload.RateY.shortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1217,21 +1281,17 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveColorTemperature:(uint8_t)moveMode - rate:(uint16_t)rate - colorTemperatureMinimum:(uint16_t)colorTemperatureMinimum - colorTemperatureMaximum:(uint16_t)colorTemperatureMaximum - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)moveColorTemperature:(CHIPColorControlClusterMoveColorTemperaturePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::MoveColorTemperature::Type request; - request.moveMode = static_cast(moveMode); - request.rate = rate; - request.colorTemperatureMinimum = colorTemperatureMinimum; - request.colorTemperatureMaximum = colorTemperatureMaximum; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.moveMode = static_cast>(payload.MoveMode.unsignedCharValue); + request.rate = payload.Rate.unsignedShortValue; + request.colorTemperatureMinimum = payload.ColorTemperatureMinimum.unsignedShortValue; + request.colorTemperatureMaximum = payload.ColorTemperatureMaximum.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1240,17 +1300,14 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveHue:(uint8_t)moveMode - rate:(uint8_t)rate - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler +- (void)moveHue:(CHIPColorControlClusterMoveHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::MoveHue::Type request; - request.moveMode = static_cast(moveMode); - request.rate = rate; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.moveMode = static_cast>(payload.MoveMode.unsignedCharValue); + request.rate = payload.Rate.unsignedCharValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1259,17 +1316,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveSaturation:(uint8_t)moveMode - rate:(uint8_t)rate - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)moveSaturation:(CHIPColorControlClusterMoveSaturationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::MoveSaturation::Type request; - request.moveMode = static_cast(moveMode); - request.rate = rate; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.moveMode = static_cast>(payload.MoveMode.unsignedCharValue); + request.rate = payload.Rate.unsignedCharValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1278,19 +1333,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveToColor:(uint16_t)colorX - colorY:(uint16_t)colorY - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler +- (void)moveToColor:(CHIPColorControlClusterMoveToColorPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::MoveToColor::Type request; - request.colorX = colorX; - request.colorY = colorY; - request.transitionTime = transitionTime; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.colorX = payload.ColorX.unsignedShortValue; + request.colorY = payload.ColorY.unsignedShortValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1299,17 +1350,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveToColorTemperature:(uint16_t)colorTemperature - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)moveToColorTemperature:(CHIPColorControlClusterMoveToColorTemperaturePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::MoveToColorTemperature::Type request; - request.colorTemperature = colorTemperature; - request.transitionTime = transitionTime; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.colorTemperature = payload.ColorTemperature.unsignedShortValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1318,19 +1367,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveToHue:(uint8_t)hue - direction:(uint8_t)direction - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler +- (void)moveToHue:(CHIPColorControlClusterMoveToHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::MoveToHue::Type request; - request.hue = hue; - request.direction = static_cast(direction); - request.transitionTime = transitionTime; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.hue = payload.Hue.unsignedCharValue; + request.direction = static_cast>(payload.Direction.unsignedCharValue); + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1339,19 +1384,16 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveToHueAndSaturation:(uint8_t)hue - saturation:(uint8_t)saturation - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)moveToHueAndSaturation:(CHIPColorControlClusterMoveToHueAndSaturationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::MoveToHueAndSaturation::Type request; - request.hue = hue; - request.saturation = saturation; - request.transitionTime = transitionTime; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.hue = payload.Hue.unsignedCharValue; + request.saturation = payload.Saturation.unsignedCharValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1360,17 +1402,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveToSaturation:(uint8_t)saturation - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)moveToSaturation:(CHIPColorControlClusterMoveToSaturationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::MoveToSaturation::Type request; - request.saturation = saturation; - request.transitionTime = transitionTime; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.saturation = payload.Saturation.unsignedCharValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1379,19 +1419,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)stepColor:(int16_t)stepX - stepY:(int16_t)stepY - transitionTime:(uint16_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler +- (void)stepColor:(CHIPColorControlClusterStepColorPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::StepColor::Type request; - request.stepX = stepX; - request.stepY = stepY; - request.transitionTime = transitionTime; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.stepX = payload.StepX.shortValue; + request.stepY = payload.StepY.shortValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1400,23 +1436,18 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)stepColorTemperature:(uint8_t)stepMode - stepSize:(uint16_t)stepSize - transitionTime:(uint16_t)transitionTime - colorTemperatureMinimum:(uint16_t)colorTemperatureMinimum - colorTemperatureMaximum:(uint16_t)colorTemperatureMaximum - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)stepColorTemperature:(CHIPColorControlClusterStepColorTemperaturePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::StepColorTemperature::Type request; - request.stepMode = static_cast(stepMode); - request.stepSize = stepSize; - request.transitionTime = transitionTime; - request.colorTemperatureMinimum = colorTemperatureMinimum; - request.colorTemperatureMaximum = colorTemperatureMaximum; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.stepMode = static_cast>(payload.StepMode.unsignedCharValue); + request.stepSize = payload.StepSize.unsignedShortValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.colorTemperatureMinimum = payload.ColorTemperatureMinimum.unsignedShortValue; + request.colorTemperatureMaximum = payload.ColorTemperatureMaximum.unsignedShortValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1425,19 +1456,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)stepHue:(uint8_t)stepMode - stepSize:(uint8_t)stepSize - transitionTime:(uint8_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride - responseHandler:(ResponseHandler)responseHandler +- (void)stepHue:(CHIPColorControlClusterStepHuePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::StepHue::Type request; - request.stepMode = static_cast(stepMode); - request.stepSize = stepSize; - request.transitionTime = transitionTime; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.stepMode = static_cast>(payload.StepMode.unsignedCharValue); + request.stepSize = payload.StepSize.unsignedCharValue; + request.transitionTime = payload.TransitionTime.unsignedCharValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1446,19 +1473,16 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)stepSaturation:(uint8_t)stepMode - stepSize:(uint8_t)stepSize - transitionTime:(uint8_t)transitionTime - optionsMask:(uint8_t)optionsMask - optionsOverride:(uint8_t)optionsOverride +- (void)stepSaturation:(CHIPColorControlClusterStepSaturationPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::StepSaturation::Type request; - request.stepMode = static_cast(stepMode); - request.stepSize = stepSize; - request.transitionTime = transitionTime; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.stepMode = static_cast>(payload.StepMode.unsignedCharValue); + request.stepSize = payload.StepSize.unsignedCharValue; + request.transitionTime = payload.TransitionTime.unsignedCharValue; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -1467,11 +1491,12 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)stopMoveStep:(uint8_t)optionsMask optionsOverride:(uint8_t)optionsOverride responseHandler:(ResponseHandler)responseHandler +- (void)stopMoveStep:(CHIPColorControlClusterStopMoveStepPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ColorControl::Commands::StopMoveStep::Type request; - request.optionsMask = optionsMask; - request.optionsOverride = optionsOverride; + request.optionsMask = payload.OptionsMask.unsignedCharValue; + request.optionsOverride = payload.OptionsOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -2046,11 +2071,13 @@ @implementation CHIPContentLauncher return &_cppCluster; } -- (void)launchContent:(bool)autoPlay data:(NSString *)data responseHandler:(ResponseHandler)responseHandler +- (void)launchContent:(CHIPContentLauncherClusterLaunchContentPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ContentLauncher::Commands::LaunchContent::Type request; - request.autoPlay = autoPlay; - request.data = [self asCharSpan:data]; + request.autoPlay = payload.AutoPlay.boolValue; + request.data = [self asCharSpan:payload.Data]; new CHIPContentLauncherClusterLaunchContentResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2060,11 +2087,12 @@ new CHIPContentLauncherClusterLaunchContentResponseCallbackBridge( }); } -- (void)launchURL:(NSString *)contentURL displayString:(NSString *)displayString responseHandler:(ResponseHandler)responseHandler +- (void)launchURL:(CHIPContentLauncherClusterLaunchURLPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ContentLauncher::Commands::LaunchURL::Type request; - request.contentURL = [self asCharSpan:contentURL]; - request.displayString = [self asCharSpan:displayString]; + request.contentURL = [self asCharSpan:payload.ContentURL]; + request.displayString = [self asCharSpan:payload.DisplayString]; new CHIPContentLauncherClusterLaunchURLResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2154,15 +2182,15 @@ @implementation CHIPDiagnosticLogs return &_cppCluster; } -- (void)retrieveLogsRequest:(uint8_t)intent - requestedProtocol:(uint8_t)requestedProtocol - transferFileDesignator:(NSData *)transferFileDesignator +- (void)retrieveLogsRequest:(CHIPDiagnosticLogsClusterRetrieveLogsRequestPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; - request.intent = static_cast(intent); - request.requestedProtocol = static_cast(requestedProtocol); - request.transferFileDesignator = [self asByteSpan:transferFileDesignator]; + request.intent = static_cast>(payload.Intent.unsignedCharValue); + request.requestedProtocol + = static_cast>(payload.RequestedProtocol.unsignedCharValue); + request.transferFileDesignator = [self asByteSpan:payload.TransferFileDesignator]; new CHIPDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2181,8 +2209,9 @@ @implementation CHIPDoorLock return &_cppCluster; } -- (void)clearAllPins:(ResponseHandler)responseHandler +- (void)clearAllPins:(CHIPDoorLockClusterClearAllPinsPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::ClearAllPins::Type request; new CHIPDoorLockClusterClearAllPinsResponseCallbackBridge( @@ -2193,8 +2222,9 @@ new CHIPDoorLockClusterClearAllPinsResponseCallbackBridge( }); } -- (void)clearAllRfids:(ResponseHandler)responseHandler +- (void)clearAllRfids:(CHIPDoorLockClusterClearAllRfidsPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::ClearAllRfids::Type request; new CHIPDoorLockClusterClearAllRfidsResponseCallbackBridge( @@ -2205,10 +2235,12 @@ new CHIPDoorLockClusterClearAllRfidsResponseCallbackBridge( }); } -- (void)clearHolidaySchedule:(uint8_t)scheduleId responseHandler:(ResponseHandler)responseHandler +- (void)clearHolidaySchedule:(CHIPDoorLockClusterClearHolidaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::ClearHolidaySchedule::Type request; - request.scheduleId = scheduleId; + request.scheduleId = payload.ScheduleId.unsignedCharValue; new CHIPDoorLockClusterClearHolidayScheduleResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2218,10 +2250,11 @@ new CHIPDoorLockClusterClearHolidayScheduleResponseCallbackBridge( }); } -- (void)clearPin:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler +- (void)clearPin:(CHIPDoorLockClusterClearPinPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::ClearPin::Type request; - request.userId = userId; + request.userId = payload.UserId.unsignedShortValue; new CHIPDoorLockClusterClearPinResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2231,10 +2264,11 @@ new CHIPDoorLockClusterClearPinResponseCallbackBridge( }); } -- (void)clearRfid:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler +- (void)clearRfid:(CHIPDoorLockClusterClearRfidPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::ClearRfid::Type request; - request.userId = userId; + request.userId = payload.UserId.unsignedShortValue; new CHIPDoorLockClusterClearRfidResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2244,11 +2278,13 @@ new CHIPDoorLockClusterClearRfidResponseCallbackBridge( }); } -- (void)clearWeekdaySchedule:(uint8_t)scheduleId userId:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler +- (void)clearWeekdaySchedule:(CHIPDoorLockClusterClearWeekdaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::ClearWeekdaySchedule::Type request; - request.scheduleId = scheduleId; - request.userId = userId; + request.scheduleId = payload.ScheduleId.unsignedCharValue; + request.userId = payload.UserId.unsignedShortValue; new CHIPDoorLockClusterClearWeekdayScheduleResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2258,11 +2294,13 @@ new CHIPDoorLockClusterClearWeekdayScheduleResponseCallbackBridge( }); } -- (void)clearYeardaySchedule:(uint8_t)scheduleId userId:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler +- (void)clearYeardaySchedule:(CHIPDoorLockClusterClearYeardaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::ClearYeardaySchedule::Type request; - request.scheduleId = scheduleId; - request.userId = userId; + request.scheduleId = payload.ScheduleId.unsignedCharValue; + request.userId = payload.UserId.unsignedShortValue; new CHIPDoorLockClusterClearYeardayScheduleResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2272,10 +2310,12 @@ new CHIPDoorLockClusterClearYeardayScheduleResponseCallbackBridge( }); } -- (void)getHolidaySchedule:(uint8_t)scheduleId responseHandler:(ResponseHandler)responseHandler +- (void)getHolidaySchedule:(CHIPDoorLockClusterGetHolidaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::GetHolidaySchedule::Type request; - request.scheduleId = scheduleId; + request.scheduleId = payload.ScheduleId.unsignedCharValue; new CHIPDoorLockClusterGetHolidayScheduleResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2285,10 +2325,11 @@ new CHIPDoorLockClusterGetHolidayScheduleResponseCallbackBridge( }); } -- (void)getLogRecord:(uint16_t)logIndex responseHandler:(ResponseHandler)responseHandler +- (void)getLogRecord:(CHIPDoorLockClusterGetLogRecordPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::GetLogRecord::Type request; - request.logIndex = logIndex; + request.logIndex = payload.LogIndex.unsignedShortValue; new CHIPDoorLockClusterGetLogRecordResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2298,10 +2339,11 @@ new CHIPDoorLockClusterGetLogRecordResponseCallbackBridge( }); } -- (void)getPin:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler +- (void)getPin:(CHIPDoorLockClusterGetPinPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::GetPin::Type request; - request.userId = userId; + request.userId = payload.UserId.unsignedShortValue; new CHIPDoorLockClusterGetPinResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2311,10 +2353,11 @@ new CHIPDoorLockClusterGetPinResponseCallbackBridge( }); } -- (void)getRfid:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler +- (void)getRfid:(CHIPDoorLockClusterGetRfidPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::GetRfid::Type request; - request.userId = userId; + request.userId = payload.UserId.unsignedShortValue; new CHIPDoorLockClusterGetRfidResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2324,10 +2367,11 @@ new CHIPDoorLockClusterGetRfidResponseCallbackBridge( }); } -- (void)getUserType:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler +- (void)getUserType:(CHIPDoorLockClusterGetUserTypePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::GetUserType::Type request; - request.userId = userId; + request.userId = payload.UserId.unsignedShortValue; new CHIPDoorLockClusterGetUserTypeResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2337,11 +2381,13 @@ new CHIPDoorLockClusterGetUserTypeResponseCallbackBridge( }); } -- (void)getWeekdaySchedule:(uint8_t)scheduleId userId:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler +- (void)getWeekdaySchedule:(CHIPDoorLockClusterGetWeekdaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::GetWeekdaySchedule::Type request; - request.scheduleId = scheduleId; - request.userId = userId; + request.scheduleId = payload.ScheduleId.unsignedCharValue; + request.userId = payload.UserId.unsignedShortValue; new CHIPDoorLockClusterGetWeekdayScheduleResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2351,11 +2397,13 @@ new CHIPDoorLockClusterGetWeekdayScheduleResponseCallbackBridge( }); } -- (void)getYeardaySchedule:(uint8_t)scheduleId userId:(uint16_t)userId responseHandler:(ResponseHandler)responseHandler +- (void)getYeardaySchedule:(CHIPDoorLockClusterGetYeardaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::GetYeardaySchedule::Type request; - request.scheduleId = scheduleId; - request.userId = userId; + request.scheduleId = payload.ScheduleId.unsignedCharValue; + request.userId = payload.UserId.unsignedShortValue; new CHIPDoorLockClusterGetYeardayScheduleResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2365,10 +2413,11 @@ new CHIPDoorLockClusterGetYeardayScheduleResponseCallbackBridge( }); } -- (void)lockDoor:(NSData *)pin responseHandler:(ResponseHandler)responseHandler +- (void)lockDoor:(CHIPDoorLockClusterLockDoorPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::LockDoor::Type request; - request.pin = [self asByteSpan:pin]; + request.pin = [self asByteSpan:payload.Pin]; new CHIPDoorLockClusterLockDoorResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2378,17 +2427,15 @@ new CHIPDoorLockClusterLockDoorResponseCallbackBridge( }); } -- (void)setHolidaySchedule:(uint8_t)scheduleId - localStartTime:(uint32_t)localStartTime - localEndTime:(uint32_t)localEndTime - operatingModeDuringHoliday:(uint8_t)operatingModeDuringHoliday - responseHandler:(ResponseHandler)responseHandler +- (void)setHolidaySchedule:(CHIPDoorLockClusterSetHolidaySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::SetHolidaySchedule::Type request; - request.scheduleId = scheduleId; - request.localStartTime = localStartTime; - request.localEndTime = localEndTime; - request.operatingModeDuringHoliday = operatingModeDuringHoliday; + request.scheduleId = payload.ScheduleId.unsignedCharValue; + request.localStartTime = payload.LocalStartTime.unsignedIntValue; + request.localEndTime = payload.LocalEndTime.unsignedIntValue; + request.operatingModeDuringHoliday = payload.OperatingModeDuringHoliday.unsignedCharValue; new CHIPDoorLockClusterSetHolidayScheduleResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2398,17 +2445,14 @@ new CHIPDoorLockClusterSetHolidayScheduleResponseCallbackBridge( }); } -- (void)setPin:(uint16_t)userId - userStatus:(uint8_t)userStatus - userType:(uint8_t)userType - pin:(NSData *)pin - responseHandler:(ResponseHandler)responseHandler +- (void)setPin:(CHIPDoorLockClusterSetPinPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::SetPin::Type request; - request.userId = userId; - request.userStatus = static_cast(userStatus); - request.userType = static_cast(userType); - request.pin = [self asByteSpan:pin]; + request.userId = payload.UserId.unsignedShortValue; + request.userStatus = static_cast>(payload.UserStatus.unsignedCharValue); + request.userType = static_cast>(payload.UserType.unsignedCharValue); + request.pin = [self asByteSpan:payload.Pin]; new CHIPDoorLockClusterSetPinResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2418,17 +2462,14 @@ new CHIPDoorLockClusterSetPinResponseCallbackBridge( }); } -- (void)setRfid:(uint16_t)userId - userStatus:(uint8_t)userStatus - userType:(uint8_t)userType - id:(NSData *)id - responseHandler:(ResponseHandler)responseHandler +- (void)setRfid:(CHIPDoorLockClusterSetRfidPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::SetRfid::Type request; - request.userId = userId; - request.userStatus = static_cast(userStatus); - request.userType = static_cast(userType); - request.id = [self asByteSpan:id]; + request.userId = payload.UserId.unsignedShortValue; + request.userStatus = static_cast>(payload.UserStatus.unsignedCharValue); + request.userType = static_cast>(payload.UserType.unsignedCharValue); + request.id = [self asByteSpan:payload.Id]; new CHIPDoorLockClusterSetRfidResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2438,11 +2479,12 @@ new CHIPDoorLockClusterSetRfidResponseCallbackBridge( }); } -- (void)setUserType:(uint16_t)userId userType:(uint8_t)userType responseHandler:(ResponseHandler)responseHandler +- (void)setUserType:(CHIPDoorLockClusterSetUserTypePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::SetUserType::Type request; - request.userId = userId; - request.userType = static_cast(userType); + request.userId = payload.UserId.unsignedShortValue; + request.userType = static_cast>(payload.UserType.unsignedCharValue); new CHIPDoorLockClusterSetUserTypeResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2452,23 +2494,18 @@ new CHIPDoorLockClusterSetUserTypeResponseCallbackBridge( }); } -- (void)setWeekdaySchedule:(uint8_t)scheduleId - userId:(uint16_t)userId - daysMask:(uint8_t)daysMask - startHour:(uint8_t)startHour - startMinute:(uint8_t)startMinute - endHour:(uint8_t)endHour - endMinute:(uint8_t)endMinute +- (void)setWeekdaySchedule:(CHIPDoorLockClusterSetWeekdaySchedulePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::SetWeekdaySchedule::Type request; - request.scheduleId = scheduleId; - request.userId = userId; - request.daysMask = static_cast(daysMask); - request.startHour = startHour; - request.startMinute = startMinute; - request.endHour = endHour; - request.endMinute = endMinute; + request.scheduleId = payload.ScheduleId.unsignedCharValue; + request.userId = payload.UserId.unsignedShortValue; + request.daysMask = static_cast>(payload.DaysMask.unsignedCharValue); + request.startHour = payload.StartHour.unsignedCharValue; + request.startMinute = payload.StartMinute.unsignedCharValue; + request.endHour = payload.EndHour.unsignedCharValue; + request.endMinute = payload.EndMinute.unsignedCharValue; new CHIPDoorLockClusterSetWeekdayScheduleResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2478,17 +2515,15 @@ new CHIPDoorLockClusterSetWeekdayScheduleResponseCallbackBridge( }); } -- (void)setYeardaySchedule:(uint8_t)scheduleId - userId:(uint16_t)userId - localStartTime:(uint32_t)localStartTime - localEndTime:(uint32_t)localEndTime +- (void)setYeardaySchedule:(CHIPDoorLockClusterSetYeardaySchedulePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::SetYeardaySchedule::Type request; - request.scheduleId = scheduleId; - request.userId = userId; - request.localStartTime = localStartTime; - request.localEndTime = localEndTime; + request.scheduleId = payload.ScheduleId.unsignedCharValue; + request.userId = payload.UserId.unsignedShortValue; + request.localStartTime = payload.LocalStartTime.unsignedIntValue; + request.localEndTime = payload.LocalEndTime.unsignedIntValue; new CHIPDoorLockClusterSetYeardayScheduleResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2498,10 +2533,11 @@ new CHIPDoorLockClusterSetYeardayScheduleResponseCallbackBridge( }); } -- (void)unlockDoor:(NSData *)pin responseHandler:(ResponseHandler)responseHandler +- (void)unlockDoor:(CHIPDoorLockClusterUnlockDoorPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::UnlockDoor::Type request; - request.pin = [self asByteSpan:pin]; + request.pin = [self asByteSpan:payload.Pin]; new CHIPDoorLockClusterUnlockDoorResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2511,11 +2547,13 @@ new CHIPDoorLockClusterUnlockDoorResponseCallbackBridge( }); } -- (void)unlockWithTimeout:(uint16_t)timeoutInSeconds pin:(NSData *)pin responseHandler:(ResponseHandler)responseHandler +- (void)unlockWithTimeout:(CHIPDoorLockClusterUnlockWithTimeoutPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; DoorLock::Commands::UnlockWithTimeout::Type request; - request.timeoutInSeconds = timeoutInSeconds; - request.pin = [self asByteSpan:pin]; + request.timeoutInSeconds = payload.TimeoutInSeconds.unsignedShortValue; + request.pin = [self asByteSpan:payload.Pin]; new CHIPDoorLockClusterUnlockWithTimeoutResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2674,8 +2712,10 @@ @implementation CHIPEthernetNetworkDiagnostics return &_cppCluster; } -- (void)resetCounts:(ResponseHandler)responseHandler +- (void)resetCounts:(CHIPEthernetNetworkDiagnosticsClusterResetCountsPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2832,15 +2872,14 @@ @implementation CHIPGeneralCommissioning return &_cppCluster; } -- (void)armFailSafe:(uint16_t)expiryLengthSeconds - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)armFailSafe:(CHIPGeneralCommissioningClusterArmFailSafePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; GeneralCommissioning::Commands::ArmFailSafe::Type request; - request.expiryLengthSeconds = expiryLengthSeconds; - request.breadcrumb = breadcrumb; - request.timeoutMs = timeoutMs; + request.expiryLengthSeconds = payload.ExpiryLengthSeconds.unsignedShortValue; + request.breadcrumb = payload.Breadcrumb.unsignedLongLongValue; + request.timeoutMs = payload.TimeoutMs.unsignedIntValue; new CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -2850,8 +2889,10 @@ new CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackBridge( }); } -- (void)commissioningComplete:(ResponseHandler)responseHandler +- (void)commissioningComplete:(CHIPGeneralCommissioningClusterCommissioningCompletePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; GeneralCommissioning::Commands::CommissioningComplete::Type request; new CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge( @@ -2863,17 +2904,15 @@ new CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge( }); } -- (void)setRegulatoryConfig:(uint8_t)location - countryCode:(NSString *)countryCode - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)setRegulatoryConfig:(CHIPGeneralCommissioningClusterSetRegulatoryConfigPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; - request.location = static_cast(location); - request.countryCode = [self asCharSpan:countryCode]; - request.breadcrumb = breadcrumb; - request.timeoutMs = timeoutMs; + request.location = static_cast>(payload.Location.unsignedCharValue); + request.countryCode = [self asCharSpan:payload.CountryCode]; + request.breadcrumb = payload.Breadcrumb.unsignedLongLongValue; + request.timeoutMs = payload.TimeoutMs.unsignedIntValue; new CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3006,11 +3045,12 @@ @implementation CHIPGroups return &_cppCluster; } -- (void)addGroup:(uint16_t)groupId groupName:(NSString *)groupName responseHandler:(ResponseHandler)responseHandler +- (void)addGroup:(CHIPGroupsClusterAddGroupPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Groups::Commands::AddGroup::Type request; - request.groupId = groupId; - request.groupName = [self asCharSpan:groupName]; + request.groupId = payload.GroupId.unsignedShortValue; + request.groupName = [self asCharSpan:payload.GroupName]; new CHIPGroupsClusterAddGroupResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3020,11 +3060,13 @@ new CHIPGroupsClusterAddGroupResponseCallbackBridge( }); } -- (void)addGroupIfIdentifying:(uint16_t)groupId groupName:(NSString *)groupName responseHandler:(ResponseHandler)responseHandler +- (void)addGroupIfIdentifying:(CHIPGroupsClusterAddGroupIfIdentifyingPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Groups::Commands::AddGroupIfIdentifying::Type request; - request.groupId = groupId; - request.groupName = [self asCharSpan:groupName]; + request.groupId = payload.GroupId.unsignedShortValue; + request.groupName = [self asCharSpan:payload.GroupName]; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3033,12 +3075,35 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)getGroupMembership:(uint8_t)groupCount groupList:(uint16_t)groupList responseHandler:(ResponseHandler)responseHandler +- (void)getGroupMembership:(CHIPGroupsClusterGetGroupMembershipPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Groups::Commands::GetGroupMembership::Type request; - request.groupCount = groupCount; - request.groupList = chip::app::DataModel::List(); - ; + request.groupCount = payload.GroupCount.unsignedCharValue; + { + using ListType = decltype(request.groupList); + using ListMemberType = ListMemberTypeGetter::Type; + if (payload.GroupList.count != 0) { + auto * listHolder = new ListHolder(payload.GroupList.count); + if (listHolder == nullptr || listHolder->mList == nullptr) { + // Now what? + return; + } + listFreer.add(listHolder); + for (size_t i = 0; i < payload.GroupList.count; ++i) { + if (![payload.GroupList[i] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value, now what? + return; + } + auto element = (NSNumber *) payload.GroupList[i]; + listHolder->mList[i] = element.unsignedShortValue; + } + request.groupList = ListType(listHolder->mList, payload.GroupList.count); + } else { + request.groupList = ListType(); + } + } new CHIPGroupsClusterGetGroupMembershipResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3048,8 +3113,9 @@ new CHIPGroupsClusterGetGroupMembershipResponseCallbackBridge( }); } -- (void)removeAllGroups:(ResponseHandler)responseHandler +- (void)removeAllGroups:(CHIPGroupsClusterRemoveAllGroupsPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Groups::Commands::RemoveAllGroups::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3059,10 +3125,11 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)removeGroup:(uint16_t)groupId responseHandler:(ResponseHandler)responseHandler +- (void)removeGroup:(CHIPGroupsClusterRemoveGroupPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Groups::Commands::RemoveGroup::Type request; - request.groupId = groupId; + request.groupId = payload.GroupId.unsignedShortValue; new CHIPGroupsClusterRemoveGroupResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3072,10 +3139,11 @@ new CHIPGroupsClusterRemoveGroupResponseCallbackBridge( }); } -- (void)viewGroup:(uint16_t)groupId responseHandler:(ResponseHandler)responseHandler +- (void)viewGroup:(CHIPGroupsClusterViewGroupPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Groups::Commands::ViewGroup::Type request; - request.groupId = groupId; + request.groupId = payload.GroupId.unsignedShortValue; new CHIPGroupsClusterViewGroupResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3108,10 +3176,11 @@ @implementation CHIPIdentify return &_cppCluster; } -- (void)identify:(uint16_t)identifyTime responseHandler:(ResponseHandler)responseHandler +- (void)identify:(CHIPIdentifyClusterIdentifyPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Identify::Commands::Identify::Type request; - request.identifyTime = identifyTime; + request.identifyTime = payload.IdentifyTime.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3120,8 +3189,9 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)identifyQuery:(ResponseHandler)responseHandler +- (void)identifyQuery:(CHIPIdentifyClusterIdentifyQueryPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Identify::Commands::IdentifyQuery::Type request; new CHIPIdentifyClusterIdentifyQueryResponseCallbackBridge( @@ -3132,13 +3202,14 @@ new CHIPIdentifyClusterIdentifyQueryResponseCallbackBridge( }); } -- (void)triggerEffect:(uint8_t)effectIdentifier - effectVariant:(uint8_t)effectVariant - responseHandler:(ResponseHandler)responseHandler +- (void)triggerEffect:(CHIPIdentifyClusterTriggerEffectPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Identify::Commands::TriggerEffect::Type request; - request.effectIdentifier = static_cast(effectIdentifier); - request.effectVariant = static_cast(effectVariant); + request.effectIdentifier + = static_cast>(payload.EffectIdentifier.unsignedCharValue); + request.effectVariant + = static_cast>(payload.EffectVariant.unsignedCharValue); new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3254,10 +3325,11 @@ @implementation CHIPKeypadInput return &_cppCluster; } -- (void)sendKey:(uint8_t)keyCode responseHandler:(ResponseHandler)responseHandler +- (void)sendKey:(CHIPKeypadInputClusterSendKeyPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; KeypadInput::Commands::SendKey::Type request; - request.keyCode = static_cast(keyCode); + request.keyCode = static_cast>(payload.KeyCode.unsignedCharValue); new CHIPKeypadInputClusterSendKeyResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3283,17 +3355,14 @@ @implementation CHIPLevelControl return &_cppCluster; } -- (void)move:(uint8_t)moveMode - rate:(uint8_t)rate - optionMask:(uint8_t)optionMask - optionOverride:(uint8_t)optionOverride - responseHandler:(ResponseHandler)responseHandler +- (void)move:(CHIPLevelControlClusterMovePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; LevelControl::Commands::Move::Type request; - request.moveMode = static_cast(moveMode); - request.rate = rate; - request.optionMask = optionMask; - request.optionOverride = optionOverride; + request.moveMode = static_cast>(payload.MoveMode.unsignedCharValue); + request.rate = payload.Rate.unsignedCharValue; + request.optionMask = payload.OptionMask.unsignedCharValue; + request.optionOverride = payload.OptionOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3302,17 +3371,14 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveToLevel:(uint8_t)level - transitionTime:(uint16_t)transitionTime - optionMask:(uint8_t)optionMask - optionOverride:(uint8_t)optionOverride - responseHandler:(ResponseHandler)responseHandler +- (void)moveToLevel:(CHIPLevelControlClusterMoveToLevelPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; LevelControl::Commands::MoveToLevel::Type request; - request.level = level; - request.transitionTime = transitionTime; - request.optionMask = optionMask; - request.optionOverride = optionOverride; + request.level = payload.Level.unsignedCharValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.optionMask = payload.OptionMask.unsignedCharValue; + request.optionOverride = payload.OptionOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3321,11 +3387,13 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveToLevelWithOnOff:(uint8_t)level transitionTime:(uint16_t)transitionTime responseHandler:(ResponseHandler)responseHandler +- (void)moveToLevelWithOnOff:(CHIPLevelControlClusterMoveToLevelWithOnOffPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; LevelControl::Commands::MoveToLevelWithOnOff::Type request; - request.level = level; - request.transitionTime = transitionTime; + request.level = payload.Level.unsignedCharValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3334,11 +3402,13 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)moveWithOnOff:(uint8_t)moveMode rate:(uint8_t)rate responseHandler:(ResponseHandler)responseHandler +- (void)moveWithOnOff:(CHIPLevelControlClusterMoveWithOnOffPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; LevelControl::Commands::MoveWithOnOff::Type request; - request.moveMode = static_cast(moveMode); - request.rate = rate; + request.moveMode = static_cast>(payload.MoveMode.unsignedCharValue); + request.rate = payload.Rate.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3347,19 +3417,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)step:(uint8_t)stepMode - stepSize:(uint8_t)stepSize - transitionTime:(uint16_t)transitionTime - optionMask:(uint8_t)optionMask - optionOverride:(uint8_t)optionOverride - responseHandler:(ResponseHandler)responseHandler +- (void)step:(CHIPLevelControlClusterStepPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; LevelControl::Commands::Step::Type request; - request.stepMode = static_cast(stepMode); - request.stepSize = stepSize; - request.transitionTime = transitionTime; - request.optionMask = optionMask; - request.optionOverride = optionOverride; + request.stepMode = static_cast>(payload.StepMode.unsignedCharValue); + request.stepSize = payload.StepSize.unsignedCharValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.optionMask = payload.OptionMask.unsignedCharValue; + request.optionOverride = payload.OptionOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3368,15 +3434,14 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)stepWithOnOff:(uint8_t)stepMode - stepSize:(uint8_t)stepSize - transitionTime:(uint16_t)transitionTime +- (void)stepWithOnOff:(CHIPLevelControlClusterStepWithOnOffPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; LevelControl::Commands::StepWithOnOff::Type request; - request.stepMode = static_cast(stepMode); - request.stepSize = stepSize; - request.transitionTime = transitionTime; + request.stepMode = static_cast>(payload.StepMode.unsignedCharValue); + request.stepSize = payload.StepSize.unsignedCharValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3385,11 +3450,12 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)stop:(uint8_t)optionMask optionOverride:(uint8_t)optionOverride responseHandler:(ResponseHandler)responseHandler +- (void)stop:(CHIPLevelControlClusterStopPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; LevelControl::Commands::Stop::Type request; - request.optionMask = optionMask; - request.optionOverride = optionOverride; + request.optionMask = payload.OptionMask.unsignedCharValue; + request.optionOverride = payload.OptionOverride.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3398,8 +3464,10 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)stopWithOnOff:(ResponseHandler)responseHandler +- (void)stopWithOnOff:(CHIPLevelControlClusterStopWithOnOffPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; LevelControl::Commands::StopWithOnOff::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3591,8 +3659,9 @@ @implementation CHIPLowPower return &_cppCluster; } -- (void)sleep:(ResponseHandler)responseHandler +- (void)sleep:(CHIPLowPowerClusterSleepPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; LowPower::Commands::Sleep::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3618,8 +3687,10 @@ @implementation CHIPMediaInput return &_cppCluster; } -- (void)hideInputStatus:(ResponseHandler)responseHandler +- (void)hideInputStatus:(CHIPMediaInputClusterHideInputStatusPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaInput::Commands::HideInputStatus::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3629,11 +3700,12 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)renameInput:(uint8_t)index name:(NSString *)name responseHandler:(ResponseHandler)responseHandler +- (void)renameInput:(CHIPMediaInputClusterRenameInputPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaInput::Commands::RenameInput::Type request; - request.index = index; - request.name = [self asCharSpan:name]; + request.index = payload.Index.unsignedCharValue; + request.name = [self asCharSpan:payload.Name]; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3642,10 +3714,11 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)selectInput:(uint8_t)index responseHandler:(ResponseHandler)responseHandler +- (void)selectInput:(CHIPMediaInputClusterSelectInputPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaInput::Commands::SelectInput::Type request; - request.index = index; + request.index = payload.Index.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3654,8 +3727,10 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)showInputStatus:(ResponseHandler)responseHandler +- (void)showInputStatus:(CHIPMediaInputClusterShowInputStatusPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaInput::Commands::ShowInputStatus::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3696,8 +3771,10 @@ @implementation CHIPMediaPlayback return &_cppCluster; } -- (void)mediaFastForward:(ResponseHandler)responseHandler +- (void)mediaFastForward:(CHIPMediaPlaybackClusterMediaFastForwardPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaPlayback::Commands::MediaFastForward::Type request; new CHIPMediaPlaybackClusterMediaFastForwardResponseCallbackBridge( @@ -3708,8 +3785,9 @@ new CHIPMediaPlaybackClusterMediaFastForwardResponseCallbackBridge( }); } -- (void)mediaNext:(ResponseHandler)responseHandler +- (void)mediaNext:(CHIPMediaPlaybackClusterMediaNextPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaPlayback::Commands::MediaNext::Type request; new CHIPMediaPlaybackClusterMediaNextResponseCallbackBridge( @@ -3720,8 +3798,9 @@ new CHIPMediaPlaybackClusterMediaNextResponseCallbackBridge( }); } -- (void)mediaPause:(ResponseHandler)responseHandler +- (void)mediaPause:(CHIPMediaPlaybackClusterMediaPausePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaPlayback::Commands::MediaPause::Type request; new CHIPMediaPlaybackClusterMediaPauseResponseCallbackBridge( @@ -3732,8 +3811,9 @@ new CHIPMediaPlaybackClusterMediaPauseResponseCallbackBridge( }); } -- (void)mediaPlay:(ResponseHandler)responseHandler +- (void)mediaPlay:(CHIPMediaPlaybackClusterMediaPlayPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaPlayback::Commands::MediaPlay::Type request; new CHIPMediaPlaybackClusterMediaPlayResponseCallbackBridge( @@ -3744,8 +3824,10 @@ new CHIPMediaPlaybackClusterMediaPlayResponseCallbackBridge( }); } -- (void)mediaPrevious:(ResponseHandler)responseHandler +- (void)mediaPrevious:(CHIPMediaPlaybackClusterMediaPreviousPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaPlayback::Commands::MediaPrevious::Type request; new CHIPMediaPlaybackClusterMediaPreviousResponseCallbackBridge( @@ -3756,8 +3838,9 @@ new CHIPMediaPlaybackClusterMediaPreviousResponseCallbackBridge( }); } -- (void)mediaRewind:(ResponseHandler)responseHandler +- (void)mediaRewind:(CHIPMediaPlaybackClusterMediaRewindPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaPlayback::Commands::MediaRewind::Type request; new CHIPMediaPlaybackClusterMediaRewindResponseCallbackBridge( @@ -3768,10 +3851,11 @@ new CHIPMediaPlaybackClusterMediaRewindResponseCallbackBridge( }); } -- (void)mediaSeek:(uint64_t)position responseHandler:(ResponseHandler)responseHandler +- (void)mediaSeek:(CHIPMediaPlaybackClusterMediaSeekPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaPlayback::Commands::MediaSeek::Type request; - request.position = position; + request.position = payload.Position.unsignedLongLongValue; new CHIPMediaPlaybackClusterMediaSeekResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3781,10 +3865,12 @@ new CHIPMediaPlaybackClusterMediaSeekResponseCallbackBridge( }); } -- (void)mediaSkipBackward:(uint64_t)deltaPositionMilliseconds responseHandler:(ResponseHandler)responseHandler +- (void)mediaSkipBackward:(CHIPMediaPlaybackClusterMediaSkipBackwardPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaPlayback::Commands::MediaSkipBackward::Type request; - request.deltaPositionMilliseconds = deltaPositionMilliseconds; + request.deltaPositionMilliseconds = payload.DeltaPositionMilliseconds.unsignedLongLongValue; new CHIPMediaPlaybackClusterMediaSkipBackwardResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3794,10 +3880,12 @@ new CHIPMediaPlaybackClusterMediaSkipBackwardResponseCallbackBridge( }); } -- (void)mediaSkipForward:(uint64_t)deltaPositionMilliseconds responseHandler:(ResponseHandler)responseHandler +- (void)mediaSkipForward:(CHIPMediaPlaybackClusterMediaSkipForwardPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaPlayback::Commands::MediaSkipForward::Type request; - request.deltaPositionMilliseconds = deltaPositionMilliseconds; + request.deltaPositionMilliseconds = payload.DeltaPositionMilliseconds.unsignedLongLongValue; new CHIPMediaPlaybackClusterMediaSkipForwardResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -3807,8 +3895,10 @@ new CHIPMediaPlaybackClusterMediaSkipForwardResponseCallbackBridge( }); } -- (void)mediaStartOver:(ResponseHandler)responseHandler +- (void)mediaStartOver:(CHIPMediaPlaybackClusterMediaStartOverPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaPlayback::Commands::MediaStartOver::Type request; new CHIPMediaPlaybackClusterMediaStartOverResponseCallbackBridge( @@ -3819,8 +3909,9 @@ new CHIPMediaPlaybackClusterMediaStartOverResponseCallbackBridge( }); } -- (void)mediaStop:(ResponseHandler)responseHandler +- (void)mediaStop:(CHIPMediaPlaybackClusterMediaStopPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; MediaPlayback::Commands::MediaStop::Type request; new CHIPMediaPlaybackClusterMediaStopResponseCallbackBridge( @@ -3903,10 +3994,11 @@ @implementation CHIPModeSelect return &_cppCluster; } -- (void)changeToMode:(uint8_t)newMode responseHandler:(ResponseHandler)responseHandler +- (void)changeToMode:(CHIPModeSelectClusterChangeToModePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ModeSelect::Commands::ChangeToMode::Type request; - request.newMode = newMode; + request.newMode = payload.NewMode.unsignedCharValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -3993,15 +4085,14 @@ @implementation CHIPNetworkCommissioning return &_cppCluster; } -- (void)addThreadNetwork:(NSData *)operationalDataset - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)addThreadNetwork:(CHIPNetworkCommissioningClusterAddThreadNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; NetworkCommissioning::Commands::AddThreadNetwork::Type request; - request.operationalDataset = [self asByteSpan:operationalDataset]; - request.breadcrumb = breadcrumb; - request.timeoutMs = timeoutMs; + request.operationalDataset = [self asByteSpan:payload.OperationalDataset]; + request.breadcrumb = payload.Breadcrumb.unsignedLongLongValue; + request.timeoutMs = payload.TimeoutMs.unsignedIntValue; new CHIPNetworkCommissioningClusterAddThreadNetworkResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4011,17 +4102,15 @@ new CHIPNetworkCommissioningClusterAddThreadNetworkResponseCallbackBridge( }); } -- (void)addWiFiNetwork:(NSData *)ssid - credentials:(NSData *)credentials - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)addWiFiNetwork:(CHIPNetworkCommissioningClusterAddWiFiNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; NetworkCommissioning::Commands::AddWiFiNetwork::Type request; - request.ssid = [self asByteSpan:ssid]; - request.credentials = [self asByteSpan:credentials]; - request.breadcrumb = breadcrumb; - request.timeoutMs = timeoutMs; + request.ssid = [self asByteSpan:payload.Ssid]; + request.credentials = [self asByteSpan:payload.Credentials]; + request.breadcrumb = payload.Breadcrumb.unsignedLongLongValue; + request.timeoutMs = payload.TimeoutMs.unsignedIntValue; new CHIPNetworkCommissioningClusterAddWiFiNetworkResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4031,15 +4120,14 @@ new CHIPNetworkCommissioningClusterAddWiFiNetworkResponseCallbackBridge( }); } -- (void)disableNetwork:(NSData *)networkID - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)disableNetwork:(CHIPNetworkCommissioningClusterDisableNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; NetworkCommissioning::Commands::DisableNetwork::Type request; - request.networkID = [self asByteSpan:networkID]; - request.breadcrumb = breadcrumb; - request.timeoutMs = timeoutMs; + request.networkID = [self asByteSpan:payload.NetworkID]; + request.breadcrumb = payload.Breadcrumb.unsignedLongLongValue; + request.timeoutMs = payload.TimeoutMs.unsignedIntValue; new CHIPNetworkCommissioningClusterDisableNetworkResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4049,15 +4137,14 @@ new CHIPNetworkCommissioningClusterDisableNetworkResponseCallbackBridge( }); } -- (void)enableNetwork:(NSData *)networkID - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)enableNetwork:(CHIPNetworkCommissioningClusterEnableNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; NetworkCommissioning::Commands::EnableNetwork::Type request; - request.networkID = [self asByteSpan:networkID]; - request.breadcrumb = breadcrumb; - request.timeoutMs = timeoutMs; + request.networkID = [self asByteSpan:payload.NetworkID]; + request.breadcrumb = payload.Breadcrumb.unsignedLongLongValue; + request.timeoutMs = payload.TimeoutMs.unsignedIntValue; new CHIPNetworkCommissioningClusterEnableNetworkResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4067,15 +4154,14 @@ new CHIPNetworkCommissioningClusterEnableNetworkResponseCallbackBridge( }); } -- (void)removeNetwork:(NSData *)networkID - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)removeNetwork:(CHIPNetworkCommissioningClusterRemoveNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; NetworkCommissioning::Commands::RemoveNetwork::Type request; - request.networkID = [self asByteSpan:networkID]; - request.breadcrumb = breadcrumb; - request.timeoutMs = timeoutMs; + request.networkID = [self asByteSpan:payload.NetworkID]; + request.breadcrumb = payload.Breadcrumb.unsignedLongLongValue; + request.timeoutMs = payload.TimeoutMs.unsignedIntValue; new CHIPNetworkCommissioningClusterRemoveNetworkResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4085,15 +4171,14 @@ new CHIPNetworkCommissioningClusterRemoveNetworkResponseCallbackBridge( }); } -- (void)scanNetworks:(NSData *)ssid - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)scanNetworks:(CHIPNetworkCommissioningClusterScanNetworksPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; NetworkCommissioning::Commands::ScanNetworks::Type request; - request.ssid = [self asByteSpan:ssid]; - request.breadcrumb = breadcrumb; - request.timeoutMs = timeoutMs; + request.ssid = [self asByteSpan:payload.Ssid]; + request.breadcrumb = payload.Breadcrumb.unsignedLongLongValue; + request.timeoutMs = payload.TimeoutMs.unsignedIntValue; new CHIPNetworkCommissioningClusterScanNetworksResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4103,15 +4188,14 @@ new CHIPNetworkCommissioningClusterScanNetworksResponseCallbackBridge( }); } -- (void)updateThreadNetwork:(NSData *)operationalDataset - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)updateThreadNetwork:(CHIPNetworkCommissioningClusterUpdateThreadNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; NetworkCommissioning::Commands::UpdateThreadNetwork::Type request; - request.operationalDataset = [self asByteSpan:operationalDataset]; - request.breadcrumb = breadcrumb; - request.timeoutMs = timeoutMs; + request.operationalDataset = [self asByteSpan:payload.OperationalDataset]; + request.breadcrumb = payload.Breadcrumb.unsignedLongLongValue; + request.timeoutMs = payload.TimeoutMs.unsignedIntValue; new CHIPNetworkCommissioningClusterUpdateThreadNetworkResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4122,17 +4206,15 @@ new CHIPNetworkCommissioningClusterUpdateThreadNetworkResponseCallbackBridge( }); } -- (void)updateWiFiNetwork:(NSData *)ssid - credentials:(NSData *)credentials - breadcrumb:(uint64_t)breadcrumb - timeoutMs:(uint32_t)timeoutMs +- (void)updateWiFiNetwork:(CHIPNetworkCommissioningClusterUpdateWiFiNetworkPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; NetworkCommissioning::Commands::UpdateWiFiNetwork::Type request; - request.ssid = [self asByteSpan:ssid]; - request.credentials = [self asByteSpan:credentials]; - request.breadcrumb = breadcrumb; - request.timeoutMs = timeoutMs; + request.ssid = [self asByteSpan:payload.Ssid]; + request.credentials = [self asByteSpan:payload.Credentials]; + request.breadcrumb = payload.Breadcrumb.unsignedLongLongValue; + request.timeoutMs = payload.TimeoutMs.unsignedIntValue; new CHIPNetworkCommissioningClusterUpdateWiFiNetworkResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4166,11 +4248,13 @@ @implementation CHIPOtaSoftwareUpdateProvider return &_cppCluster; } -- (void)applyUpdateRequest:(NSData *)updateToken newVersion:(uint32_t)newVersion responseHandler:(ResponseHandler)responseHandler +- (void)applyUpdateRequest:(CHIPOtaSoftwareUpdateProviderClusterApplyUpdateRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; - request.updateToken = [self asByteSpan:updateToken]; - request.newVersion = newVersion; + request.updateToken = [self asByteSpan:payload.UpdateToken]; + request.newVersion = payload.NewVersion.unsignedIntValue; new CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4180,13 +4264,13 @@ new CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge( }); } -- (void)notifyUpdateApplied:(NSData *)updateToken - softwareVersion:(uint32_t)softwareVersion +- (void)notifyUpdateApplied:(CHIPOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; - request.updateToken = [self asByteSpan:updateToken]; - request.softwareVersion = softwareVersion; + request.updateToken = [self asByteSpan:payload.UpdateToken]; + request.softwareVersion = payload.SoftwareVersion.unsignedIntValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -4195,27 +4279,54 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)queryImage:(uint16_t)vendorId - productId:(uint16_t)productId - softwareVersion:(uint32_t)softwareVersion - protocolsSupported:(uint8_t)protocolsSupported - hardwareVersion:(uint16_t)hardwareVersion - location:(NSString *)location - requestorCanConsent:(bool)requestorCanConsent - metadataForProvider:(NSData *)metadataForProvider - responseHandler:(ResponseHandler)responseHandler +- (void)queryImage:(CHIPOtaSoftwareUpdateProviderClusterQueryImagePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; - request.vendorId = static_cast(vendorId); - request.productId = productId; - request.softwareVersion = softwareVersion; - request.protocolsSupported - = chip::app::DataModel::List(); - ; - request.hardwareVersion = chip::Optional(hardwareVersion); - request.location = chip::Optional([self asCharSpan:location]); - request.requestorCanConsent = chip::Optional(requestorCanConsent); - request.metadataForProvider = chip::Optional([self asByteSpan:metadataForProvider]); + request.vendorId = static_cast>(payload.VendorId.unsignedShortValue); + request.productId = payload.ProductId.unsignedShortValue; + request.softwareVersion = payload.SoftwareVersion.unsignedIntValue; + { + using ListType = decltype(request.protocolsSupported); + using ListMemberType = ListMemberTypeGetter::Type; + if (payload.ProtocolsSupported.count != 0) { + auto * listHolder = new ListHolder(payload.ProtocolsSupported.count); + if (listHolder == nullptr || listHolder->mList == nullptr) { + // Now what? + return; + } + listFreer.add(listHolder); + for (size_t i = 0; i < payload.ProtocolsSupported.count; ++i) { + if (![payload.ProtocolsSupported[i] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value, now what? + return; + } + auto element = (NSNumber *) payload.ProtocolsSupported[i]; + listHolder->mList[i] + = static_castmList[i])>>(element.unsignedCharValue); + } + request.protocolsSupported = ListType(listHolder->mList, payload.ProtocolsSupported.count); + } else { + request.protocolsSupported = ListType(); + } + } + if (payload.HardwareVersion != nil) { + auto & definedValue = request.hardwareVersion.Emplace(); + definedValue = payload.HardwareVersion.unsignedShortValue; + } + if (payload.Location != nil) { + auto & definedValue = request.location.Emplace(); + definedValue = [self asCharSpan:payload.Location]; + } + if (payload.RequestorCanConsent != nil) { + auto & definedValue = request.requestorCanConsent.Emplace(); + definedValue = payload.RequestorCanConsent.boolValue; + } + if (payload.MetadataForProvider != nil) { + auto & definedValue = request.metadataForProvider.Emplace(); + definedValue = [self asByteSpan:payload.MetadataForProvider]; + } new CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4241,17 +4352,19 @@ @implementation CHIPOtaSoftwareUpdateRequestor return &_cppCluster; } -- (void)announceOtaProvider:(uint64_t)providerLocation - vendorId:(uint16_t)vendorId - announcementReason:(uint8_t)announcementReason - metadataForNode:(NSData *)metadataForNode +- (void)announceOtaProvider:(CHIPOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type request; - request.providerLocation = providerLocation; - request.vendorId = static_cast(vendorId); - request.announcementReason = static_cast(announcementReason); - request.metadataForNode = chip::Optional([self asByteSpan:metadataForNode]); + request.providerLocation = payload.ProviderLocation.unsignedLongLongValue; + request.vendorId = static_cast>(payload.VendorId.unsignedShortValue); + request.announcementReason + = static_cast>(payload.AnnouncementReason.unsignedCharValue); + if (payload.MetadataForNode != nil) { + auto & definedValue = request.metadataForNode.Emplace(); + definedValue = [self asByteSpan:payload.MetadataForNode]; + } new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -4353,8 +4466,9 @@ @implementation CHIPOnOff return &_cppCluster; } -- (void)off:(ResponseHandler)responseHandler +- (void)off:(CHIPOnOffClusterOffPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OnOff::Commands::Off::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4364,11 +4478,13 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)offWithEffect:(uint8_t)effectId effectVariant:(uint8_t)effectVariant responseHandler:(ResponseHandler)responseHandler +- (void)offWithEffect:(CHIPOnOffClusterOffWithEffectPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OnOff::Commands::OffWithEffect::Type request; - request.effectId = static_cast(effectId); - request.effectVariant = static_cast(effectVariant); + request.effectId = static_cast>(payload.EffectId.unsignedCharValue); + request.effectVariant + = static_cast>(payload.EffectVariant.unsignedCharValue); new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -4377,8 +4493,9 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)on:(ResponseHandler)responseHandler +- (void)on:(CHIPOnOffClusterOnPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OnOff::Commands::On::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4388,8 +4505,10 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)onWithRecallGlobalScene:(ResponseHandler)responseHandler +- (void)onWithRecallGlobalScene:(CHIPOnOffClusterOnWithRecallGlobalScenePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OnOff::Commands::OnWithRecallGlobalScene::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4399,15 +4518,14 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)onWithTimedOff:(uint8_t)onOffControl - onTime:(uint16_t)onTime - offWaitTime:(uint16_t)offWaitTime - responseHandler:(ResponseHandler)responseHandler +- (void)onWithTimedOff:(CHIPOnOffClusterOnWithTimedOffPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OnOff::Commands::OnWithTimedOff::Type request; - request.onOffControl = static_cast(onOffControl); - request.onTime = onTime; - request.offWaitTime = offWaitTime; + request.onOffControl + = static_cast>(payload.OnOffControl.unsignedCharValue); + request.onTime = payload.OnTime.unsignedShortValue; + request.offWaitTime = payload.OffWaitTime.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -4416,8 +4534,9 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)toggle:(ResponseHandler)responseHandler +- (void)toggle:(CHIPOnOffClusterTogglePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OnOff::Commands::Toggle::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4562,19 +4681,18 @@ @implementation CHIPOperationalCredentials return &_cppCluster; } -- (void)addNOC:(NSData *)NOCValue - ICACValue:(NSData *)ICACValue - IPKValue:(NSData *)IPKValue - caseAdminNode:(uint64_t)caseAdminNode - adminVendorId:(uint16_t)adminVendorId - responseHandler:(ResponseHandler)responseHandler +- (void)addNOC:(CHIPOperationalCredentialsClusterAddNOCPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OperationalCredentials::Commands::AddNOC::Type request; - request.NOCValue = [self asByteSpan:NOCValue]; - request.ICACValue = chip::Optional([self asByteSpan:ICACValue]); - request.IPKValue = [self asByteSpan:IPKValue]; - request.caseAdminNode = caseAdminNode; - request.adminVendorId = adminVendorId; + request.NOCValue = [self asByteSpan:payload.NOCValue]; + if (payload.ICACValue != nil) { + auto & definedValue = request.ICACValue.Emplace(); + definedValue = [self asByteSpan:payload.ICACValue]; + } + request.IPKValue = [self asByteSpan:payload.IPKValue]; + request.caseAdminNode = payload.CaseAdminNode.unsignedLongLongValue; + request.adminVendorId = payload.AdminVendorId.unsignedShortValue; new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4584,10 +4702,12 @@ new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( }); } -- (void)addTrustedRootCertificate:(NSData *)rootCertificate responseHandler:(ResponseHandler)responseHandler +- (void)addTrustedRootCertificate:(CHIPOperationalCredentialsClusterAddTrustedRootCertificatePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; - request.rootCertificate = [self asByteSpan:rootCertificate]; + request.rootCertificate = [self asByteSpan:payload.RootCertificate]; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -4596,10 +4716,12 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)attestationRequest:(NSData *)attestationNonce responseHandler:(ResponseHandler)responseHandler +- (void)attestationRequest:(CHIPOperationalCredentialsClusterAttestationRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OperationalCredentials::Commands::AttestationRequest::Type request; - request.attestationNonce = [self asByteSpan:attestationNonce]; + request.attestationNonce = [self asByteSpan:payload.AttestationNonce]; new CHIPOperationalCredentialsClusterAttestationResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4609,10 +4731,12 @@ new CHIPOperationalCredentialsClusterAttestationResponseCallbackBridge( }); } -- (void)certificateChainRequest:(uint8_t)certificateType responseHandler:(ResponseHandler)responseHandler +- (void)certificateChainRequest:(CHIPOperationalCredentialsClusterCertificateChainRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OperationalCredentials::Commands::CertificateChainRequest::Type request; - request.certificateType = certificateType; + request.certificateType = payload.CertificateType.unsignedCharValue; new CHIPOperationalCredentialsClusterCertificateChainResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4623,10 +4747,12 @@ new CHIPOperationalCredentialsClusterCertificateChainResponseCallbackBridge( }); } -- (void)opCSRRequest:(NSData *)CSRNonce responseHandler:(ResponseHandler)responseHandler +- (void)opCSRRequest:(CHIPOperationalCredentialsClusterOpCSRRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OperationalCredentials::Commands::OpCSRRequest::Type request; - request.CSRNonce = [self asByteSpan:CSRNonce]; + request.CSRNonce = [self asByteSpan:payload.CSRNonce]; new CHIPOperationalCredentialsClusterOpCSRResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4636,10 +4762,12 @@ new CHIPOperationalCredentialsClusterOpCSRResponseCallbackBridge( }); } -- (void)removeFabric:(uint8_t)fabricIndex responseHandler:(ResponseHandler)responseHandler +- (void)removeFabric:(CHIPOperationalCredentialsClusterRemoveFabricPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OperationalCredentials::Commands::RemoveFabric::Type request; - request.fabricIndex = fabricIndex; + request.fabricIndex = payload.FabricIndex.unsignedCharValue; new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4649,10 +4777,12 @@ new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( }); } -- (void)removeTrustedRootCertificate:(NSData *)trustedRootIdentifier responseHandler:(ResponseHandler)responseHandler +- (void)removeTrustedRootCertificate:(CHIPOperationalCredentialsClusterRemoveTrustedRootCertificatePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OperationalCredentials::Commands::RemoveTrustedRootCertificate::Type request; - request.trustedRootIdentifier = [self asByteSpan:trustedRootIdentifier]; + request.trustedRootIdentifier = [self asByteSpan:payload.TrustedRootIdentifier]; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -4661,10 +4791,12 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)updateFabricLabel:(NSString *)label responseHandler:(ResponseHandler)responseHandler +- (void)updateFabricLabel:(CHIPOperationalCredentialsClusterUpdateFabricLabelPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OperationalCredentials::Commands::UpdateFabricLabel::Type request; - request.label = [self asCharSpan:label]; + request.label = [self asCharSpan:payload.Label]; new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4674,11 +4806,16 @@ new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( }); } -- (void)updateNOC:(NSData *)NOCValue ICACValue:(NSData *)ICACValue responseHandler:(ResponseHandler)responseHandler +- (void)updateNOC:(CHIPOperationalCredentialsClusterUpdateNOCPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; OperationalCredentials::Commands::UpdateNOC::Type request; - request.NOCValue = [self asByteSpan:NOCValue]; - request.ICACValue = chip::Optional([self asByteSpan:ICACValue]); + request.NOCValue = [self asByteSpan:payload.NOCValue]; + if (payload.ICACValue != nil) { + auto & definedValue = request.ICACValue.Emplace(); + definedValue = [self asByteSpan:payload.ICACValue]; + } new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5195,23 +5332,39 @@ @implementation CHIPScenes return &_cppCluster; } -- (void)addScene:(uint16_t)groupId - sceneId:(uint8_t)sceneId - transitionTime:(uint16_t)transitionTime - sceneName:(NSString *)sceneName - clusterId:(uint32_t)clusterId - length:(uint8_t)length - value:(uint8_t)value - responseHandler:(ResponseHandler)responseHandler +- (void)addScene:(CHIPScenesClusterAddScenePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Scenes::Commands::AddScene::Type request; - request.groupId = groupId; - request.sceneId = sceneId; - request.transitionTime = transitionTime; - request.sceneName = [self asCharSpan:sceneName]; - request.extensionFieldSets - = chip::app::DataModel::List(); - ; + request.groupId = payload.GroupId.unsignedShortValue; + request.sceneId = payload.SceneId.unsignedCharValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; + request.sceneName = [self asCharSpan:payload.SceneName]; + { + using ListType = decltype(request.extensionFieldSets); + using ListMemberType = ListMemberTypeGetter::Type; + if (payload.ExtensionFieldSets.count != 0) { + auto * listHolder = new ListHolder(payload.ExtensionFieldSets.count); + if (listHolder == nullptr || listHolder->mList == nullptr) { + // Now what? + return; + } + listFreer.add(listHolder); + for (size_t i = 0; i < payload.ExtensionFieldSets.count; ++i) { + if (![payload.ExtensionFieldSets[i] isKindOfClass:[CHIPScenesClusterSceneExtensionFieldSet class]]) { + // Wrong kind of value, now what? + return; + } + auto element = (CHIPScenesClusterSceneExtensionFieldSet *) payload.ExtensionFieldSets[i]; + listHolder->mList[i].clusterId = element.ClusterId.unsignedIntValue; + listHolder->mList[i].length = element.Length.unsignedCharValue; + listHolder->mList[i].value = element.Value.unsignedCharValue; + } + request.extensionFieldSets = ListType(listHolder->mList, payload.ExtensionFieldSets.count); + } else { + request.extensionFieldSets = ListType(); + } + } new CHIPScenesClusterAddSceneResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5221,10 +5374,12 @@ new CHIPScenesClusterAddSceneResponseCallbackBridge( }); } -- (void)getSceneMembership:(uint16_t)groupId responseHandler:(ResponseHandler)responseHandler +- (void)getSceneMembership:(CHIPScenesClusterGetSceneMembershipPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Scenes::Commands::GetSceneMembership::Type request; - request.groupId = groupId; + request.groupId = payload.GroupId.unsignedShortValue; new CHIPScenesClusterGetSceneMembershipResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5234,15 +5389,13 @@ new CHIPScenesClusterGetSceneMembershipResponseCallbackBridge( }); } -- (void)recallScene:(uint16_t)groupId - sceneId:(uint8_t)sceneId - transitionTime:(uint16_t)transitionTime - responseHandler:(ResponseHandler)responseHandler +- (void)recallScene:(CHIPScenesClusterRecallScenePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Scenes::Commands::RecallScene::Type request; - request.groupId = groupId; - request.sceneId = sceneId; - request.transitionTime = transitionTime; + request.groupId = payload.GroupId.unsignedShortValue; + request.sceneId = payload.SceneId.unsignedCharValue; + request.transitionTime = payload.TransitionTime.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -5251,10 +5404,11 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)removeAllScenes:(uint16_t)groupId responseHandler:(ResponseHandler)responseHandler +- (void)removeAllScenes:(CHIPScenesClusterRemoveAllScenesPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Scenes::Commands::RemoveAllScenes::Type request; - request.groupId = groupId; + request.groupId = payload.GroupId.unsignedShortValue; new CHIPScenesClusterRemoveAllScenesResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5264,11 +5418,12 @@ new CHIPScenesClusterRemoveAllScenesResponseCallbackBridge( }); } -- (void)removeScene:(uint16_t)groupId sceneId:(uint8_t)sceneId responseHandler:(ResponseHandler)responseHandler +- (void)removeScene:(CHIPScenesClusterRemoveScenePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Scenes::Commands::RemoveScene::Type request; - request.groupId = groupId; - request.sceneId = sceneId; + request.groupId = payload.GroupId.unsignedShortValue; + request.sceneId = payload.SceneId.unsignedCharValue; new CHIPScenesClusterRemoveSceneResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5278,11 +5433,12 @@ new CHIPScenesClusterRemoveSceneResponseCallbackBridge( }); } -- (void)storeScene:(uint16_t)groupId sceneId:(uint8_t)sceneId responseHandler:(ResponseHandler)responseHandler +- (void)storeScene:(CHIPScenesClusterStoreScenePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Scenes::Commands::StoreScene::Type request; - request.groupId = groupId; - request.sceneId = sceneId; + request.groupId = payload.GroupId.unsignedShortValue; + request.sceneId = payload.SceneId.unsignedCharValue; new CHIPScenesClusterStoreSceneResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5292,11 +5448,12 @@ new CHIPScenesClusterStoreSceneResponseCallbackBridge( }); } -- (void)viewScene:(uint16_t)groupId sceneId:(uint8_t)sceneId responseHandler:(ResponseHandler)responseHandler +- (void)viewScene:(CHIPScenesClusterViewScenePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Scenes::Commands::ViewScene::Type request; - request.groupId = groupId; - request.sceneId = sceneId; + request.groupId = payload.GroupId.unsignedShortValue; + request.sceneId = payload.SceneId.unsignedCharValue; new CHIPScenesClusterViewSceneResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5357,8 +5514,10 @@ @implementation CHIPSoftwareDiagnostics return &_cppCluster; } -- (void)resetWatermarks:(ResponseHandler)responseHandler +- (void)resetWatermarks:(CHIPSoftwareDiagnosticsClusterResetWatermarksPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; SoftwareDiagnostics::Commands::ResetWatermarks::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5476,10 +5635,11 @@ @implementation CHIPTvChannel return &_cppCluster; } -- (void)changeChannel:(NSString *)match responseHandler:(ResponseHandler)responseHandler +- (void)changeChannel:(CHIPTvChannelClusterChangeChannelPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TvChannel::Commands::ChangeChannel::Type request; - request.match = [self asCharSpan:match]; + request.match = [self asCharSpan:payload.Match]; new CHIPTvChannelClusterChangeChannelResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5489,13 +5649,13 @@ new CHIPTvChannelClusterChangeChannelResponseCallbackBridge( }); } -- (void)changeChannelByNumber:(uint16_t)majorNumber - minorNumber:(uint16_t)minorNumber +- (void)changeChannelByNumber:(CHIPTvChannelClusterChangeChannelByNumberPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TvChannel::Commands::ChangeChannelByNumber::Type request; - request.majorNumber = majorNumber; - request.minorNumber = minorNumber; + request.majorNumber = payload.MajorNumber.unsignedShortValue; + request.minorNumber = payload.MinorNumber.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -5504,10 +5664,11 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)skipChannel:(uint16_t)count responseHandler:(ResponseHandler)responseHandler +- (void)skipChannel:(CHIPTvChannelClusterSkipChannelPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TvChannel::Commands::SkipChannel::Type request; - request.count = count; + request.count = payload.Count.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -5554,11 +5715,13 @@ @implementation CHIPTargetNavigator return &_cppCluster; } -- (void)navigateTarget:(uint8_t)target data:(NSString *)data responseHandler:(ResponseHandler)responseHandler +- (void)navigateTarget:(CHIPTargetNavigatorClusterNavigateTargetPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TargetNavigator::Commands::NavigateTarget::Type request; - request.target = target; - request.data = [self asCharSpan:data]; + request.target = payload.Target.unsignedCharValue; + request.data = [self asCharSpan:payload.Data]; new CHIPTargetNavigatorClusterNavigateTargetResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5674,8 +5837,9 @@ @implementation CHIPTestCluster return &_cppCluster; } -- (void)test:(ResponseHandler)responseHandler +- (void)test:(CHIPTestClusterClusterTestPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TestCluster::Commands::Test::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5685,11 +5849,13 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)testAddArguments:(uint8_t)arg1 arg2:(uint8_t)arg2 responseHandler:(ResponseHandler)responseHandler +- (void)testAddArguments:(CHIPTestClusterClusterTestAddArgumentsPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TestCluster::Commands::TestAddArguments::Type request; - request.arg1 = arg1; - request.arg2 = arg2; + request.arg1 = payload.Arg1.unsignedCharValue; + request.arg2 = payload.Arg2.unsignedCharValue; new CHIPTestClusterClusterTestAddArgumentsResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5699,11 +5865,13 @@ new CHIPTestClusterClusterTestAddArgumentsResponseCallbackBridge( }); } -- (void)testEnumsRequest:(uint16_t)arg1 arg2:(uint8_t)arg2 responseHandler:(ResponseHandler)responseHandler +- (void)testEnumsRequest:(CHIPTestClusterClusterTestEnumsRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TestCluster::Commands::TestEnumsRequest::Type request; - request.arg1 = static_cast(arg1); - request.arg2 = static_cast(arg2); + request.arg1 = static_cast>(payload.Arg1.unsignedShortValue); + request.arg2 = static_cast>(payload.Arg2.unsignedCharValue); new CHIPTestClusterClusterTestEnumsResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5713,11 +5881,34 @@ new CHIPTestClusterClusterTestEnumsResponseCallbackBridge( }); } -- (void)testListInt8UArgumentRequest:(uint8_t)arg1 responseHandler:(ResponseHandler)responseHandler +- (void)testListInt8UArgumentRequest:(CHIPTestClusterClusterTestListInt8UArgumentRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TestCluster::Commands::TestListInt8UArgumentRequest::Type request; - request.arg1 = chip::app::DataModel::List(); - ; + { + using ListType = decltype(request.arg1); + using ListMemberType = ListMemberTypeGetter::Type; + if (payload.Arg1.count != 0) { + auto * listHolder = new ListHolder(payload.Arg1.count); + if (listHolder == nullptr || listHolder->mList == nullptr) { + // Now what? + return; + } + listFreer.add(listHolder); + for (size_t i = 0; i < payload.Arg1.count; ++i) { + if (![payload.Arg1[i] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value, now what? + return; + } + auto element = (NSNumber *) payload.Arg1[i]; + listHolder->mList[i] = element.unsignedCharValue; + } + request.arg1 = ListType(listHolder->mList, payload.Arg1.count); + } else { + request.arg1 = ListType(); + } + } new CHIPTestClusterClusterBooleanResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5727,11 +5918,34 @@ new CHIPTestClusterClusterBooleanResponseCallbackBridge( }); } -- (void)testListInt8UReverseRequest:(uint8_t)arg1 responseHandler:(ResponseHandler)responseHandler +- (void)testListInt8UReverseRequest:(CHIPTestClusterClusterTestListInt8UReverseRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TestCluster::Commands::TestListInt8UReverseRequest::Type request; - request.arg1 = chip::app::DataModel::List(); - ; + { + using ListType = decltype(request.arg1); + using ListMemberType = ListMemberTypeGetter::Type; + if (payload.Arg1.count != 0) { + auto * listHolder = new ListHolder(payload.Arg1.count); + if (listHolder == nullptr || listHolder->mList == nullptr) { + // Now what? + return; + } + listFreer.add(listHolder); + for (size_t i = 0; i < payload.Arg1.count; ++i) { + if (![payload.Arg1[i] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value, now what? + return; + } + auto element = (NSNumber *) payload.Arg1[i]; + listHolder->mList[i] = element.unsignedCharValue; + } + request.arg1 = ListType(listHolder->mList, payload.Arg1.count); + } else { + request.arg1 = ListType(); + } + } new CHIPTestClusterClusterTestListInt8UReverseResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5741,17 +5955,41 @@ new CHIPTestClusterClusterTestListInt8UReverseResponseCallbackBridge( }); } -- (void)testListStructArgumentRequest:(uint8_t)a - b:(bool)b - c:(uint8_t)c - d:(NSData *)d - e:(NSString *)e - f:(uint8_t)f +- (void)testListStructArgumentRequest:(CHIPTestClusterClusterTestListStructArgumentRequestPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TestCluster::Commands::TestListStructArgumentRequest::Type request; - request.arg1 = chip::app::DataModel::List(); - ; + { + using ListType = decltype(request.arg1); + using ListMemberType = ListMemberTypeGetter::Type; + if (payload.Arg1.count != 0) { + auto * listHolder = new ListHolder(payload.Arg1.count); + if (listHolder == nullptr || listHolder->mList == nullptr) { + // Now what? + return; + } + listFreer.add(listHolder); + for (size_t i = 0; i < payload.Arg1.count; ++i) { + if (![payload.Arg1[i] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value, now what? + return; + } + auto element = (CHIPTestClusterClusterSimpleStruct *) payload.Arg1[i]; + listHolder->mList[i].a = element.A.unsignedCharValue; + listHolder->mList[i].b = element.B.boolValue; + listHolder->mList[i].c + = static_castmList[i].c)>>(element.C.unsignedCharValue); + listHolder->mList[i].d = [self asByteSpan:element.D]; + listHolder->mList[i].e = [self asCharSpan:element.E]; + listHolder->mList[i].f + = static_castmList[i].f)>>(element.F.unsignedCharValue); + } + request.arg1 = ListType(listHolder->mList, payload.Arg1.count); + } else { + request.arg1 = ListType(); + } + } new CHIPTestClusterClusterBooleanResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5761,8 +5999,10 @@ new CHIPTestClusterClusterBooleanResponseCallbackBridge( }); } -- (void)testNotHandled:(ResponseHandler)responseHandler +- (void)testNotHandled:(CHIPTestClusterClusterTestNotHandledPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TestCluster::Commands::TestNotHandled::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5772,10 +6012,20 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)testNullableOptionalRequest:(uint8_t)arg1 responseHandler:(ResponseHandler)responseHandler +- (void)testNullableOptionalRequest:(CHIPTestClusterClusterTestNullableOptionalRequestPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TestCluster::Commands::TestNullableOptionalRequest::Type request; - request.arg1 = chip::Optional>(chip::app::DataModel::Nullable(arg1)); + if (payload.Arg1 != nil) { + auto & definedValue = request.arg1.Emplace(); + if (payload.Arg1 == nil) { + definedValue.SetNull(); + } else { + auto & nonNullValue = definedValue.SetNonNull(); + nonNullValue = payload.Arg1.unsignedCharValue; + } + } new CHIPTestClusterClusterTestNullableOptionalResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5785,8 +6035,9 @@ new CHIPTestClusterClusterTestNullableOptionalResponseCallbackBridge( }); } -- (void)testSpecific:(ResponseHandler)responseHandler +- (void)testSpecific:(CHIPTestClusterClusterTestSpecificPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TestCluster::Commands::TestSpecific::Type request; new CHIPTestClusterClusterTestSpecificResponseCallbackBridge( @@ -5797,17 +6048,17 @@ new CHIPTestClusterClusterTestSpecificResponseCallbackBridge( }); } -- (void)testStructArgumentRequest:(uint8_t)a - b:(bool)b - c:(uint8_t)c - d:(NSData *)d - e:(NSString *)e - f:(uint8_t)f +- (void)testStructArgumentRequest:(CHIPTestClusterClusterTestStructArgumentRequestPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TestCluster::Commands::TestStructArgumentRequest::Type request; - request.arg1 = chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type(); - ; + request.arg1.a = payload.Arg1.A.unsignedCharValue; + request.arg1.b = payload.Arg1.B.boolValue; + request.arg1.c = static_cast>(payload.Arg1.C.unsignedCharValue); + request.arg1.d = [self asByteSpan:payload.Arg1.D]; + request.arg1.e = [self asCharSpan:payload.Arg1.E]; + request.arg1.f = static_cast>(payload.Arg1.F.unsignedCharValue); new CHIPTestClusterClusterBooleanResponseCallbackBridge( self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5817,8 +6068,10 @@ new CHIPTestClusterClusterBooleanResponseCallbackBridge( }); } -- (void)testUnknownCommand:(ResponseHandler)responseHandler +- (void)testUnknownCommand:(CHIPTestClusterClusterTestUnknownCommandPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; TestCluster::Commands::TestUnknownCommand::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -6436,8 +6689,10 @@ @implementation CHIPThermostat return &_cppCluster; } -- (void)clearWeeklySchedule:(ResponseHandler)responseHandler +- (void)clearWeeklySchedule:(CHIPThermostatClusterClearWeeklySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Thermostat::Commands::ClearWeeklySchedule::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -6447,8 +6702,10 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)getRelayStatusLog:(ResponseHandler)responseHandler +- (void)getRelayStatusLog:(CHIPThermostatClusterGetRelayStatusLogPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Thermostat::Commands::GetRelayStatusLog::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -6458,11 +6715,15 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)getWeeklySchedule:(uint8_t)daysToReturn modeToReturn:(uint8_t)modeToReturn responseHandler:(ResponseHandler)responseHandler +- (void)getWeeklySchedule:(CHIPThermostatClusterGetWeeklySchedulePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Thermostat::Commands::GetWeeklySchedule::Type request; - request.daysToReturn = static_cast(daysToReturn); - request.modeToReturn = static_cast(modeToReturn); + request.daysToReturn + = static_cast>(payload.DaysToReturn.unsignedCharValue); + request.modeToReturn + = static_cast>(payload.ModeToReturn.unsignedCharValue); new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -6471,18 +6732,39 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)setWeeklySchedule:(uint8_t)numberOfTransitionsForSequence - dayOfWeekForSequence:(uint8_t)dayOfWeekForSequence - modeForSequence:(uint8_t)modeForSequence - payload:(uint8_t)payload +- (void)setWeeklySchedule:(CHIPThermostatClusterSetWeeklySchedulePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Thermostat::Commands::SetWeeklySchedule::Type request; - request.numberOfTransitionsForSequence = numberOfTransitionsForSequence; - request.dayOfWeekForSequence = static_cast(dayOfWeekForSequence); - request.modeForSequence = static_cast(modeForSequence); - request.payload = chip::app::DataModel::List(); - ; + request.numberOfTransitionsForSequence = payload.NumberOfTransitionsForSequence.unsignedCharValue; + request.dayOfWeekForSequence = static_cast>( + payload.DayOfWeekForSequence.unsignedCharValue); + request.modeForSequence + = static_cast>(payload.ModeForSequence.unsignedCharValue); + { + using ListType = decltype(request.payload); + using ListMemberType = ListMemberTypeGetter::Type; + if (payload.Payload.count != 0) { + auto * listHolder = new ListHolder(payload.Payload.count); + if (listHolder == nullptr || listHolder->mList == nullptr) { + // Now what? + return; + } + listFreer.add(listHolder); + for (size_t i = 0; i < payload.Payload.count; ++i) { + if (![payload.Payload[i] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value, now what? + return; + } + auto element = (NSNumber *) payload.Payload[i]; + listHolder->mList[i] = element.unsignedCharValue; + } + request.payload = ListType(listHolder->mList, payload.Payload.count); + } else { + request.payload = ListType(); + } + } new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -6491,11 +6773,13 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)setpointRaiseLower:(uint8_t)mode amount:(int8_t)amount responseHandler:(ResponseHandler)responseHandler +- (void)setpointRaiseLower:(CHIPThermostatClusterSetpointRaiseLowerPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; Thermostat::Commands::SetpointRaiseLower::Type request; - request.mode = static_cast(mode); - request.amount = amount; + request.mode = static_cast>(payload.Mode.unsignedCharValue); + request.amount = payload.Amount.charValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -6786,8 +7070,10 @@ @implementation CHIPThreadNetworkDiagnostics return &_cppCluster; } -- (void)resetCounts:(ResponseHandler)responseHandler +- (void)resetCounts:(CHIPThreadNetworkDiagnosticsClusterResetCountsPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; ThreadNetworkDiagnostics::Commands::ResetCounts::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -7282,8 +7568,10 @@ @implementation CHIPWiFiNetworkDiagnostics return &_cppCluster; } -- (void)resetCounts:(ResponseHandler)responseHandler +- (void)resetCounts:(CHIPWiFiNetworkDiagnosticsClusterResetCountsPayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; WiFiNetworkDiagnostics::Commands::ResetCounts::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -7400,8 +7688,9 @@ @implementation CHIPWindowCovering return &_cppCluster; } -- (void)downOrClose:(ResponseHandler)responseHandler +- (void)downOrClose:(CHIPWindowCoveringClusterDownOrClosePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; WindowCovering::Commands::DownOrClose::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -7411,13 +7700,13 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)goToLiftPercentage:(uint8_t)liftPercentageValue - liftPercent100thsValue:(uint16_t)liftPercent100thsValue +- (void)goToLiftPercentage:(CHIPWindowCoveringClusterGoToLiftPercentagePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; WindowCovering::Commands::GoToLiftPercentage::Type request; - request.liftPercentageValue = liftPercentageValue; - request.liftPercent100thsValue = liftPercent100thsValue; + request.liftPercentageValue = payload.LiftPercentageValue.unsignedCharValue; + request.liftPercent100thsValue = payload.LiftPercent100thsValue.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -7426,10 +7715,12 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)goToLiftValue:(uint16_t)liftValue responseHandler:(ResponseHandler)responseHandler +- (void)goToLiftValue:(CHIPWindowCoveringClusterGoToLiftValuePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; WindowCovering::Commands::GoToLiftValue::Type request; - request.liftValue = liftValue; + request.liftValue = payload.LiftValue.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -7438,13 +7729,13 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)goToTiltPercentage:(uint8_t)tiltPercentageValue - tiltPercent100thsValue:(uint16_t)tiltPercent100thsValue +- (void)goToTiltPercentage:(CHIPWindowCoveringClusterGoToTiltPercentagePayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; WindowCovering::Commands::GoToTiltPercentage::Type request; - request.tiltPercentageValue = tiltPercentageValue; - request.tiltPercent100thsValue = tiltPercent100thsValue; + request.tiltPercentageValue = payload.TiltPercentageValue.unsignedCharValue; + request.tiltPercent100thsValue = payload.TiltPercent100thsValue.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -7453,10 +7744,12 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)goToTiltValue:(uint16_t)tiltValue responseHandler:(ResponseHandler)responseHandler +- (void)goToTiltValue:(CHIPWindowCoveringClusterGoToTiltValuePayload * _Nonnull)payload + responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; WindowCovering::Commands::GoToTiltValue::Type request; - request.tiltValue = tiltValue; + request.tiltValue = payload.TiltValue.unsignedShortValue; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); @@ -7465,8 +7758,9 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)stopMotion:(ResponseHandler)responseHandler +- (void)stopMotion:(CHIPWindowCoveringClusterStopMotionPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; WindowCovering::Commands::StopMotion::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { @@ -7476,8 +7770,9 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } -- (void)upOrOpen:(ResponseHandler)responseHandler +- (void)upOrOpen:(CHIPWindowCoveringClusterUpOrOpenPayload * _Nonnull)payload responseHandler:(ResponseHandler)responseHandler { + ListFreer listFreer; WindowCovering::Commands::UpOrOpen::Type request; new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h new file mode 100644 index 00000000000000..b55ce8ec5a51de --- /dev/null +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h @@ -0,0 +1,1980 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#ifndef CHIP_COMMAND_PAYLOADS_H +#define CHIP_COMMAND_PAYLOADS_H + +#import +#import + +@interface CHIPIdentifyClusterIdentifyPayload : NSObject +@property (strong) NSNumber * _Nonnull IdentifyTime; +@end + +@interface CHIPIdentifyClusterIdentifyQueryResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Timeout; +@end + +@interface CHIPIdentifyClusterIdentifyQueryPayload : NSObject +@end + +@interface CHIPIdentifyClusterTriggerEffectPayload : NSObject +@property (strong) NSNumber * _Nonnull EffectIdentifier; +@property (strong) NSNumber * _Nonnull EffectVariant; +@end + +@interface CHIPGroupsClusterAddGroupPayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSString * _Nonnull GroupName; +@end + +@interface CHIPGroupsClusterAddGroupResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull GroupId; +@end + +@interface CHIPGroupsClusterViewGroupPayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@end + +@interface CHIPGroupsClusterViewGroupResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSString * _Nonnull GroupName; +@end + +@interface CHIPGroupsClusterGetGroupMembershipPayload : NSObject +@property (strong) NSNumber * _Nonnull GroupCount; +@property (strong) NSArray * _Nonnull GroupList; +@end + +@interface CHIPGroupsClusterGetGroupMembershipResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Capacity; +@property (strong) NSNumber * _Nonnull GroupCount; +@property (strong) NSArray * _Nonnull GroupList; +@end + +@interface CHIPGroupsClusterRemoveGroupPayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@end + +@interface CHIPGroupsClusterRemoveGroupResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull GroupId; +@end + +@interface CHIPGroupsClusterRemoveAllGroupsPayload : NSObject +@end + +@interface CHIPGroupsClusterAddGroupIfIdentifyingPayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSString * _Nonnull GroupName; +@end + +@interface CHIPScenesClusterAddScenePayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSString * _Nonnull SceneName; +@property (strong) NSArray * _Nonnull ExtensionFieldSets; +@end + +@interface CHIPScenesClusterAddSceneResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@end + +@interface CHIPScenesClusterViewScenePayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@end + +@interface CHIPScenesClusterViewSceneResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSString * _Nonnull SceneName; +@property (strong) NSArray * _Nonnull ExtensionFieldSets; +@end + +@interface CHIPScenesClusterRemoveScenePayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@end + +@interface CHIPScenesClusterRemoveSceneResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@end + +@interface CHIPScenesClusterRemoveAllScenesPayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@end + +@interface CHIPScenesClusterRemoveAllScenesResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull GroupId; +@end + +@interface CHIPScenesClusterStoreScenePayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@end + +@interface CHIPScenesClusterStoreSceneResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@end + +@interface CHIPScenesClusterRecallScenePayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@property (strong) NSNumber * _Nonnull TransitionTime; +@end + +@interface CHIPScenesClusterGetSceneMembershipPayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@end + +@interface CHIPScenesClusterGetSceneMembershipResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull Capacity; +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneCount; +@property (strong) NSArray * _Nonnull SceneList; +@end + +@interface CHIPScenesClusterEnhancedAddScenePayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSString * _Nonnull SceneName; +@property (strong) NSArray * _Nonnull ExtensionFieldSets; +@end + +@interface CHIPScenesClusterEnhancedAddSceneResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@end + +@interface CHIPScenesClusterEnhancedViewScenePayload : NSObject +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@end + +@interface CHIPScenesClusterEnhancedViewSceneResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull SceneId; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSString * _Nonnull SceneName; +@property (strong) NSArray * _Nonnull ExtensionFieldSets; +@end + +@interface CHIPScenesClusterCopyScenePayload : NSObject +@property (strong) NSNumber * _Nonnull Mode; +@property (strong) NSNumber * _Nonnull GroupIdFrom; +@property (strong) NSNumber * _Nonnull SceneIdFrom; +@property (strong) NSNumber * _Nonnull GroupIdTo; +@property (strong) NSNumber * _Nonnull SceneIdTo; +@end + +@interface CHIPScenesClusterCopySceneResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull GroupIdFrom; +@property (strong) NSNumber * _Nonnull SceneIdFrom; +@end + +@interface CHIPOnOffClusterOffPayload : NSObject +@end + +@interface CHIPOnOffClusterSampleMfgSpecificOffWithTransitionPayload : NSObject +@end + +@interface CHIPOnOffClusterOnPayload : NSObject +@end + +@interface CHIPOnOffClusterSampleMfgSpecificOnWithTransitionPayload : NSObject +@end + +@interface CHIPOnOffClusterSampleMfgSpecificOnWithTransition2Payload : NSObject +@end + +@interface CHIPOnOffClusterTogglePayload : NSObject +@end + +@interface CHIPOnOffClusterSampleMfgSpecificToggleWithTransitionPayload : NSObject +@end + +@interface CHIPOnOffClusterSampleMfgSpecificToggleWithTransition2Payload : NSObject +@end + +@interface CHIPOnOffClusterOffWithEffectPayload : NSObject +@property (strong) NSNumber * _Nonnull EffectId; +@property (strong) NSNumber * _Nonnull EffectVariant; +@end + +@interface CHIPOnOffClusterOnWithRecallGlobalScenePayload : NSObject +@end + +@interface CHIPOnOffClusterOnWithTimedOffPayload : NSObject +@property (strong) NSNumber * _Nonnull OnOffControl; +@property (strong) NSNumber * _Nonnull OnTime; +@property (strong) NSNumber * _Nonnull OffWaitTime; +@end + +@interface CHIPLevelControlClusterMoveToLevelPayload : NSObject +@property (strong) NSNumber * _Nonnull Level; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionMask; +@property (strong) NSNumber * _Nonnull OptionOverride; +@end + +@interface CHIPLevelControlClusterMovePayload : NSObject +@property (strong) NSNumber * _Nonnull MoveMode; +@property (strong) NSNumber * _Nonnull Rate; +@property (strong) NSNumber * _Nonnull OptionMask; +@property (strong) NSNumber * _Nonnull OptionOverride; +@end + +@interface CHIPLevelControlClusterStepPayload : NSObject +@property (strong) NSNumber * _Nonnull StepMode; +@property (strong) NSNumber * _Nonnull StepSize; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionMask; +@property (strong) NSNumber * _Nonnull OptionOverride; +@end + +@interface CHIPLevelControlClusterStopPayload : NSObject +@property (strong) NSNumber * _Nonnull OptionMask; +@property (strong) NSNumber * _Nonnull OptionOverride; +@end + +@interface CHIPLevelControlClusterMoveToLevelWithOnOffPayload : NSObject +@property (strong) NSNumber * _Nonnull Level; +@property (strong) NSNumber * _Nonnull TransitionTime; +@end + +@interface CHIPLevelControlClusterMoveWithOnOffPayload : NSObject +@property (strong) NSNumber * _Nonnull MoveMode; +@property (strong) NSNumber * _Nonnull Rate; +@end + +@interface CHIPLevelControlClusterStepWithOnOffPayload : NSObject +@property (strong) NSNumber * _Nonnull StepMode; +@property (strong) NSNumber * _Nonnull StepSize; +@property (strong) NSNumber * _Nonnull TransitionTime; +@end + +@interface CHIPLevelControlClusterStopWithOnOffPayload : NSObject +@end + +@interface CHIPAlarmsClusterResetAlarmPayload : NSObject +@property (strong) NSNumber * _Nonnull AlarmCode; +@property (strong) NSNumber * _Nonnull ClusterId; +@end + +@interface CHIPAlarmsClusterAlarmPayload : NSObject +@property (strong) NSNumber * _Nonnull AlarmCode; +@property (strong) NSNumber * _Nonnull ClusterId; +@end + +@interface CHIPAlarmsClusterResetAllAlarmsPayload : NSObject +@end + +@interface CHIPAlarmsClusterGetAlarmResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull AlarmCode; +@property (strong) NSNumber * _Nonnull ClusterId; +@property (strong) NSNumber * _Nonnull TimeStamp; +@end + +@interface CHIPAlarmsClusterGetAlarmPayload : NSObject +@end + +@interface CHIPAlarmsClusterResetAlarmLogPayload : NSObject +@end + +@interface CHIPPowerProfileClusterPowerProfileRequestPayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@end + +@interface CHIPPowerProfileClusterPowerProfileNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull TotalProfileNum; +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull NumOfTransferredPhases; +@property (strong) NSArray * _Nonnull TransferredPhases; +@end + +@interface CHIPPowerProfileClusterPowerProfileStateRequestPayload : NSObject +@end + +@interface CHIPPowerProfileClusterPowerProfileResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull TotalProfileNum; +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull NumOfTransferredPhases; +@property (strong) NSArray * _Nonnull TransferredPhases; +@end + +@interface CHIPPowerProfileClusterGetPowerProfilePriceResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull Currency; +@property (strong) NSNumber * _Nonnull Price; +@property (strong) NSNumber * _Nonnull PriceTrailingDigit; +@end + +@interface CHIPPowerProfileClusterPowerProfileStateResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileCount; +@property (strong) NSArray * _Nonnull PowerProfileRecords; +@end + +@interface CHIPPowerProfileClusterGetOverallSchedulePriceResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Currency; +@property (strong) NSNumber * _Nonnull Price; +@property (strong) NSNumber * _Nonnull PriceTrailingDigit; +@end + +@interface CHIPPowerProfileClusterGetPowerProfilePricePayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@end + +@interface CHIPPowerProfileClusterEnergyPhasesScheduleNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull NumOfScheduledPhases; +@property (strong) NSArray * _Nonnull ScheduledPhases; +@end + +@interface CHIPPowerProfileClusterPowerProfilesStateNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileCount; +@property (strong) NSArray * _Nonnull PowerProfileRecords; +@end + +@interface CHIPPowerProfileClusterEnergyPhasesScheduleResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull NumOfScheduledPhases; +@property (strong) NSArray * _Nonnull ScheduledPhases; +@end + +@interface CHIPPowerProfileClusterGetOverallSchedulePricePayload : NSObject +@end + +@interface CHIPPowerProfileClusterPowerProfileScheduleConstraintsRequestPayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@end + +@interface CHIPPowerProfileClusterEnergyPhasesScheduleRequestPayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@end + +@interface CHIPPowerProfileClusterEnergyPhasesScheduleStateRequestPayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@end + +@interface CHIPPowerProfileClusterEnergyPhasesScheduleStateResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull NumOfScheduledPhases; +@property (strong) NSArray * _Nonnull ScheduledPhases; +@end + +@interface CHIPPowerProfileClusterGetPowerProfilePriceExtendedResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull Currency; +@property (strong) NSNumber * _Nonnull Price; +@property (strong) NSNumber * _Nonnull PriceTrailingDigit; +@end + +@interface CHIPPowerProfileClusterEnergyPhasesScheduleStateNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull NumOfScheduledPhases; +@property (strong) NSArray * _Nonnull ScheduledPhases; +@end + +@interface CHIPPowerProfileClusterPowerProfileScheduleConstraintsNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull StartAfter; +@property (strong) NSNumber * _Nonnull StopBefore; +@end + +@interface CHIPPowerProfileClusterPowerProfileScheduleConstraintsResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull StartAfter; +@property (strong) NSNumber * _Nonnull StopBefore; +@end + +@interface CHIPPowerProfileClusterGetPowerProfilePriceExtendedPayload : NSObject +@property (strong) NSNumber * _Nonnull Options; +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull PowerProfileStartTime; +@end + +@interface CHIPApplianceControlClusterExecutionOfACommandPayload : NSObject +@property (strong) NSNumber * _Nonnull CommandId; +@end + +@interface CHIPApplianceControlClusterSignalStateResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ApplianceStatus; +@property (strong) NSNumber * _Nonnull RemoteEnableFlagsAndDeviceStatus2; +@property (strong) NSNumber * _Nonnull ApplianceStatus2; +@end + +@interface CHIPApplianceControlClusterSignalStatePayload : NSObject +@end + +@interface CHIPApplianceControlClusterSignalStateNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull ApplianceStatus; +@property (strong) NSNumber * _Nonnull RemoteEnableFlagsAndDeviceStatus2; +@property (strong) NSNumber * _Nonnull ApplianceStatus2; +@end + +@interface CHIPApplianceControlClusterWriteFunctionsPayload : NSObject +@property (strong) NSNumber * _Nonnull FunctionId; +@property (strong) NSNumber * _Nonnull FunctionDataType; +@property (strong) NSArray * _Nonnull FunctionData; +@end + +@interface CHIPApplianceControlClusterOverloadPauseResumePayload : NSObject +@end + +@interface CHIPApplianceControlClusterOverloadPausePayload : NSObject +@end + +@interface CHIPApplianceControlClusterOverloadWarningPayload : NSObject +@property (strong) NSNumber * _Nonnull WarningEvent; +@end + +@interface CHIPPollControlClusterCheckInPayload : NSObject +@end + +@interface CHIPPollControlClusterCheckInResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull StartFastPolling; +@property (strong) NSNumber * _Nonnull FastPollTimeout; +@end + +@interface CHIPPollControlClusterFastPollStopPayload : NSObject +@end + +@interface CHIPPollControlClusterSetLongPollIntervalPayload : NSObject +@property (strong) NSNumber * _Nonnull NewLongPollInterval; +@end + +@interface CHIPPollControlClusterSetShortPollIntervalPayload : NSObject +@property (strong) NSNumber * _Nonnull NewShortPollInterval; +@end + +@interface CHIPBridgedActionsClusterInstantActionPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@end + +@interface CHIPBridgedActionsClusterInstantActionWithTransitionPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@property (strong) NSNumber * _Nonnull TransitionTime; +@end + +@interface CHIPBridgedActionsClusterStartActionPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@end + +@interface CHIPBridgedActionsClusterStartActionWithDurationPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@property (strong) NSNumber * _Nonnull Duration; +@end + +@interface CHIPBridgedActionsClusterStopActionPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@end + +@interface CHIPBridgedActionsClusterPauseActionPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@end + +@interface CHIPBridgedActionsClusterPauseActionWithDurationPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@property (strong) NSNumber * _Nonnull Duration; +@end + +@interface CHIPBridgedActionsClusterResumeActionPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@end + +@interface CHIPBridgedActionsClusterEnableActionPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@end + +@interface CHIPBridgedActionsClusterEnableActionWithDurationPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@property (strong) NSNumber * _Nonnull Duration; +@end + +@interface CHIPBridgedActionsClusterDisableActionPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@end + +@interface CHIPBridgedActionsClusterDisableActionWithDurationPayload : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSNumber * _Nullable InvokeID; +@property (strong) NSNumber * _Nonnull Duration; +@end + +@interface CHIPBasicClusterStartUpPayload : NSObject +@end + +@interface CHIPBasicClusterMfgSpecificPingPayload : NSObject +@end + +@interface CHIPBasicClusterShutDownPayload : NSObject +@end + +@interface CHIPBasicClusterLeavePayload : NSObject +@end + +@interface CHIPOtaSoftwareUpdateProviderClusterQueryImagePayload : NSObject +@property (strong) NSNumber * _Nonnull VendorId; +@property (strong) NSNumber * _Nonnull ProductId; +@property (strong) NSNumber * _Nonnull SoftwareVersion; +@property (strong) NSArray * _Nonnull ProtocolsSupported; +@property (strong) NSNumber * _Nullable HardwareVersion; +@property (strong) NSString * _Nullable Location; +@property (strong) NSNumber * _Nullable RequestorCanConsent; +@property (strong) NSData * _Nullable MetadataForProvider; +@end + +@interface CHIPOtaSoftwareUpdateProviderClusterApplyUpdateRequestPayload : NSObject +@property (strong) NSData * _Nonnull UpdateToken; +@property (strong) NSNumber * _Nonnull NewVersion; +@end + +@interface CHIPOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedPayload : NSObject +@property (strong) NSData * _Nonnull UpdateToken; +@property (strong) NSNumber * _Nonnull SoftwareVersion; +@end + +@interface CHIPOtaSoftwareUpdateProviderClusterQueryImageResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nullable DelayedActionTime; +@property (strong) NSString * _Nullable ImageURI; +@property (strong) NSNumber * _Nullable SoftwareVersion; +@property (strong) NSString * _Nullable SoftwareVersionString; +@property (strong) NSData * _Nullable UpdateToken; +@property (strong) NSNumber * _Nullable UserConsentNeeded; +@property (strong) NSData * _Nullable MetadataForRequestor; +@end + +@interface CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Action; +@property (strong) NSNumber * _Nonnull DelayedActionTime; +@end + +@interface CHIPOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderPayload : NSObject +@property (strong) NSNumber * _Nonnull ProviderLocation; +@property (strong) NSNumber * _Nonnull VendorId; +@property (strong) NSNumber * _Nonnull AnnouncementReason; +@property (strong) NSData * _Nullable MetadataForNode; +@end + +@interface CHIPGeneralCommissioningClusterArmFailSafePayload : NSObject +@property (strong) NSNumber * _Nonnull ExpiryLengthSeconds; +@property (strong) NSNumber * _Nonnull Breadcrumb; +@property (strong) NSNumber * _Nonnull TimeoutMs; +@end + +@interface CHIPGeneralCommissioningClusterArmFailSafeResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ErrorCode; +@property (strong) NSString * _Nonnull DebugText; +@end + +@interface CHIPGeneralCommissioningClusterSetRegulatoryConfigPayload : NSObject +@property (strong) NSNumber * _Nonnull Location; +@property (strong) NSString * _Nonnull CountryCode; +@property (strong) NSNumber * _Nonnull Breadcrumb; +@property (strong) NSNumber * _Nonnull TimeoutMs; +@end + +@interface CHIPGeneralCommissioningClusterSetRegulatoryConfigResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ErrorCode; +@property (strong) NSString * _Nonnull DebugText; +@end + +@interface CHIPGeneralCommissioningClusterCommissioningCompletePayload : NSObject +@end + +@interface CHIPGeneralCommissioningClusterCommissioningCompleteResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ErrorCode; +@property (strong) NSString * _Nonnull DebugText; +@end + +@interface CHIPNetworkCommissioningClusterScanNetworksPayload : NSObject +@property (strong) NSData * _Nonnull Ssid; +@property (strong) NSNumber * _Nonnull Breadcrumb; +@property (strong) NSNumber * _Nonnull TimeoutMs; +@end + +@interface CHIPNetworkCommissioningClusterScanNetworksResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ErrorCode; +@property (strong) NSString * _Nonnull DebugText; +@property (strong) NSArray * _Nonnull WifiScanResults; +@property (strong) NSArray * _Nonnull ThreadScanResults; +@end + +@interface CHIPNetworkCommissioningClusterAddWiFiNetworkPayload : NSObject +@property (strong) NSData * _Nonnull Ssid; +@property (strong) NSData * _Nonnull Credentials; +@property (strong) NSNumber * _Nonnull Breadcrumb; +@property (strong) NSNumber * _Nonnull TimeoutMs; +@end + +@interface CHIPNetworkCommissioningClusterAddWiFiNetworkResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ErrorCode; +@property (strong) NSString * _Nonnull DebugText; +@end + +@interface CHIPNetworkCommissioningClusterUpdateWiFiNetworkPayload : NSObject +@property (strong) NSData * _Nonnull Ssid; +@property (strong) NSData * _Nonnull Credentials; +@property (strong) NSNumber * _Nonnull Breadcrumb; +@property (strong) NSNumber * _Nonnull TimeoutMs; +@end + +@interface CHIPNetworkCommissioningClusterUpdateWiFiNetworkResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ErrorCode; +@property (strong) NSString * _Nonnull DebugText; +@end + +@interface CHIPNetworkCommissioningClusterAddThreadNetworkPayload : NSObject +@property (strong) NSData * _Nonnull OperationalDataset; +@property (strong) NSNumber * _Nonnull Breadcrumb; +@property (strong) NSNumber * _Nonnull TimeoutMs; +@end + +@interface CHIPNetworkCommissioningClusterAddThreadNetworkResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ErrorCode; +@property (strong) NSString * _Nonnull DebugText; +@end + +@interface CHIPNetworkCommissioningClusterUpdateThreadNetworkPayload : NSObject +@property (strong) NSData * _Nonnull OperationalDataset; +@property (strong) NSNumber * _Nonnull Breadcrumb; +@property (strong) NSNumber * _Nonnull TimeoutMs; +@end + +@interface CHIPNetworkCommissioningClusterUpdateThreadNetworkResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ErrorCode; +@property (strong) NSString * _Nonnull DebugText; +@end + +@interface CHIPNetworkCommissioningClusterRemoveNetworkPayload : NSObject +@property (strong) NSData * _Nonnull NetworkID; +@property (strong) NSNumber * _Nonnull Breadcrumb; +@property (strong) NSNumber * _Nonnull TimeoutMs; +@end + +@interface CHIPNetworkCommissioningClusterRemoveNetworkResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ErrorCode; +@property (strong) NSString * _Nonnull DebugText; +@end + +@interface CHIPNetworkCommissioningClusterEnableNetworkPayload : NSObject +@property (strong) NSData * _Nonnull NetworkID; +@property (strong) NSNumber * _Nonnull Breadcrumb; +@property (strong) NSNumber * _Nonnull TimeoutMs; +@end + +@interface CHIPNetworkCommissioningClusterEnableNetworkResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ErrorCode; +@property (strong) NSString * _Nonnull DebugText; +@end + +@interface CHIPNetworkCommissioningClusterDisableNetworkPayload : NSObject +@property (strong) NSData * _Nonnull NetworkID; +@property (strong) NSNumber * _Nonnull Breadcrumb; +@property (strong) NSNumber * _Nonnull TimeoutMs; +@end + +@interface CHIPNetworkCommissioningClusterDisableNetworkResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ErrorCode; +@property (strong) NSString * _Nonnull DebugText; +@end + +@interface CHIPDiagnosticLogsClusterRetrieveLogsRequestPayload : NSObject +@property (strong) NSNumber * _Nonnull Intent; +@property (strong) NSNumber * _Nonnull RequestedProtocol; +@property (strong) NSData * _Nonnull TransferFileDesignator; +@end + +@interface CHIPDiagnosticLogsClusterRetrieveLogsResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSData * _Nonnull Content; +@property (strong) NSNumber * _Nonnull TimeStamp; +@property (strong) NSNumber * _Nonnull TimeSinceBoot; +@end + +@interface CHIPSoftwareDiagnosticsClusterResetWatermarksPayload : NSObject +@end + +@interface CHIPThreadNetworkDiagnosticsClusterResetCountsPayload : NSObject +@end + +@interface CHIPWiFiNetworkDiagnosticsClusterResetCountsPayload : NSObject +@end + +@interface CHIPEthernetNetworkDiagnosticsClusterResetCountsPayload : NSObject +@end + +@interface CHIPBridgedDeviceBasicClusterStartUpPayload : NSObject +@end + +@interface CHIPBridgedDeviceBasicClusterShutDownPayload : NSObject +@end + +@interface CHIPBridgedDeviceBasicClusterLeavePayload : NSObject +@end + +@interface CHIPBridgedDeviceBasicClusterReachableChangedPayload : NSObject +@end + +@interface CHIPAdministratorCommissioningClusterOpenCommissioningWindowPayload : NSObject +@property (strong) NSNumber * _Nonnull CommissioningTimeout; +@property (strong) NSData * _Nonnull PAKEVerifier; +@property (strong) NSNumber * _Nonnull Discriminator; +@property (strong) NSNumber * _Nonnull Iterations; +@property (strong) NSData * _Nonnull Salt; +@property (strong) NSNumber * _Nonnull PasscodeID; +@end + +@interface CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowPayload : NSObject +@property (strong) NSNumber * _Nonnull CommissioningTimeout; +@end + +@interface CHIPAdministratorCommissioningClusterRevokeCommissioningPayload : NSObject +@end + +@interface CHIPOperationalCredentialsClusterAttestationRequestPayload : NSObject +@property (strong) NSData * _Nonnull AttestationNonce; +@end + +@interface CHIPOperationalCredentialsClusterAttestationResponsePayload : NSObject +@property (strong) NSData * _Nonnull AttestationElements; +@property (strong) NSData * _Nonnull Signature; +@end + +@interface CHIPOperationalCredentialsClusterCertificateChainRequestPayload : NSObject +@property (strong) NSNumber * _Nonnull CertificateType; +@end + +@interface CHIPOperationalCredentialsClusterCertificateChainResponsePayload : NSObject +@property (strong) NSData * _Nonnull Certificate; +@end + +@interface CHIPOperationalCredentialsClusterOpCSRRequestPayload : NSObject +@property (strong) NSData * _Nonnull CSRNonce; +@end + +@interface CHIPOperationalCredentialsClusterOpCSRResponsePayload : NSObject +@property (strong) NSData * _Nonnull NOCSRElements; +@property (strong) NSData * _Nonnull AttestationSignature; +@end + +@interface CHIPOperationalCredentialsClusterAddNOCPayload : NSObject +@property (strong) NSData * _Nonnull NOCValue; +@property (strong) NSData * _Nullable ICACValue; +@property (strong) NSData * _Nonnull IPKValue; +@property (strong) NSNumber * _Nonnull CaseAdminNode; +@property (strong) NSNumber * _Nonnull AdminVendorId; +@end + +@interface CHIPOperationalCredentialsClusterUpdateNOCPayload : NSObject +@property (strong) NSData * _Nonnull NOCValue; +@property (strong) NSData * _Nullable ICACValue; +@end + +@interface CHIPOperationalCredentialsClusterNOCResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull StatusCode; +@property (strong) NSNumber * _Nonnull FabricIndex; +@property (strong) NSString * _Nonnull DebugText; +@end + +@interface CHIPOperationalCredentialsClusterUpdateFabricLabelPayload : NSObject +@property (strong) NSString * _Nonnull Label; +@end + +@interface CHIPOperationalCredentialsClusterRemoveFabricPayload : NSObject +@property (strong) NSNumber * _Nonnull FabricIndex; +@end + +@interface CHIPOperationalCredentialsClusterAddTrustedRootCertificatePayload : NSObject +@property (strong) NSData * _Nonnull RootCertificate; +@end + +@interface CHIPOperationalCredentialsClusterRemoveTrustedRootCertificatePayload : NSObject +@property (strong) NSData * _Nonnull TrustedRootIdentifier; +@end + +@interface CHIPModeSelectClusterChangeToModePayload : NSObject +@property (strong) NSNumber * _Nonnull NewMode; +@end + +@interface CHIPDoorLockClusterLockDoorPayload : NSObject +@property (strong) NSData * _Nonnull Pin; +@end + +@interface CHIPDoorLockClusterLockDoorResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterUnlockDoorPayload : NSObject +@property (strong) NSData * _Nonnull Pin; +@end + +@interface CHIPDoorLockClusterUnlockDoorResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterTogglePayload : NSObject +@property (strong) NSString * _Nonnull Pin; +@end + +@interface CHIPDoorLockClusterToggleResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterUnlockWithTimeoutPayload : NSObject +@property (strong) NSNumber * _Nonnull TimeoutInSeconds; +@property (strong) NSData * _Nonnull Pin; +@end + +@interface CHIPDoorLockClusterUnlockWithTimeoutResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterGetLogRecordPayload : NSObject +@property (strong) NSNumber * _Nonnull LogIndex; +@end + +@interface CHIPDoorLockClusterGetLogRecordResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull LogEntryId; +@property (strong) NSNumber * _Nonnull Timestamp; +@property (strong) NSNumber * _Nonnull EventType; +@property (strong) NSNumber * _Nonnull Source; +@property (strong) NSNumber * _Nonnull EventIdOrAlarmCode; +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSData * _Nonnull Pin; +@end + +@interface CHIPDoorLockClusterSetPinPayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull UserStatus; +@property (strong) NSNumber * _Nonnull UserType; +@property (strong) NSData * _Nonnull Pin; +@end + +@interface CHIPDoorLockClusterSetPinResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterGetPinPayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@end + +@interface CHIPDoorLockClusterGetPinResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull UserStatus; +@property (strong) NSNumber * _Nonnull UserType; +@property (strong) NSData * _Nonnull Pin; +@end + +@interface CHIPDoorLockClusterClearPinPayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@end + +@interface CHIPDoorLockClusterClearPinResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterClearAllPinsPayload : NSObject +@end + +@interface CHIPDoorLockClusterClearAllPinsResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterSetUserStatusPayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull UserStatus; +@end + +@interface CHIPDoorLockClusterSetUserStatusResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterGetUserStatusPayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@end + +@interface CHIPDoorLockClusterGetUserStatusResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterSetWeekdaySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull DaysMask; +@property (strong) NSNumber * _Nonnull StartHour; +@property (strong) NSNumber * _Nonnull StartMinute; +@property (strong) NSNumber * _Nonnull EndHour; +@property (strong) NSNumber * _Nonnull EndMinute; +@end + +@interface CHIPDoorLockClusterSetWeekdayScheduleResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterGetWeekdaySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@property (strong) NSNumber * _Nonnull UserId; +@end + +@interface CHIPDoorLockClusterGetWeekdayScheduleResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull DaysMask; +@property (strong) NSNumber * _Nonnull StartHour; +@property (strong) NSNumber * _Nonnull StartMinute; +@property (strong) NSNumber * _Nonnull EndHour; +@property (strong) NSNumber * _Nonnull EndMinute; +@end + +@interface CHIPDoorLockClusterClearWeekdaySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@property (strong) NSNumber * _Nonnull UserId; +@end + +@interface CHIPDoorLockClusterClearWeekdayScheduleResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterSetYeardaySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull LocalStartTime; +@property (strong) NSNumber * _Nonnull LocalEndTime; +@end + +@interface CHIPDoorLockClusterSetYeardayScheduleResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterGetYeardaySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@property (strong) NSNumber * _Nonnull UserId; +@end + +@interface CHIPDoorLockClusterGetYeardayScheduleResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull LocalStartTime; +@property (strong) NSNumber * _Nonnull LocalEndTime; +@end + +@interface CHIPDoorLockClusterClearYeardaySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@property (strong) NSNumber * _Nonnull UserId; +@end + +@interface CHIPDoorLockClusterClearYeardayScheduleResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterSetHolidaySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@property (strong) NSNumber * _Nonnull LocalStartTime; +@property (strong) NSNumber * _Nonnull LocalEndTime; +@property (strong) NSNumber * _Nonnull OperatingModeDuringHoliday; +@end + +@interface CHIPDoorLockClusterSetHolidayScheduleResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterGetHolidaySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@end + +@interface CHIPDoorLockClusterGetHolidayScheduleResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull LocalStartTime; +@property (strong) NSNumber * _Nonnull LocalEndTime; +@property (strong) NSNumber * _Nonnull OperatingModeDuringHoliday; +@end + +@interface CHIPDoorLockClusterClearHolidaySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull ScheduleId; +@end + +@interface CHIPDoorLockClusterClearHolidayScheduleResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterSetUserTypePayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull UserType; +@end + +@interface CHIPDoorLockClusterSetUserTypeResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterGetUserTypePayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@end + +@interface CHIPDoorLockClusterGetUserTypeResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull UserType; +@end + +@interface CHIPDoorLockClusterSetRfidPayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull UserStatus; +@property (strong) NSNumber * _Nonnull UserType; +@property (strong) NSData * _Nonnull Id; +@end + +@interface CHIPDoorLockClusterSetRfidResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterGetRfidPayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@end + +@interface CHIPDoorLockClusterGetRfidResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSNumber * _Nonnull UserStatus; +@property (strong) NSNumber * _Nonnull UserType; +@property (strong) NSData * _Nonnull Rfid; +@end + +@interface CHIPDoorLockClusterClearRfidPayload : NSObject +@property (strong) NSNumber * _Nonnull UserId; +@end + +@interface CHIPDoorLockClusterClearRfidResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterClearAllRfidsPayload : NSObject +@end + +@interface CHIPDoorLockClusterClearAllRfidsResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPDoorLockClusterOperationEventNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull Source; +@property (strong) NSNumber * _Nonnull EventCode; +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSData * _Nonnull Pin; +@property (strong) NSNumber * _Nonnull TimeStamp; +@property (strong) NSString * _Nonnull Data; +@end + +@interface CHIPDoorLockClusterProgrammingEventNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull Source; +@property (strong) NSNumber * _Nonnull EventCode; +@property (strong) NSNumber * _Nonnull UserId; +@property (strong) NSData * _Nonnull Pin; +@property (strong) NSNumber * _Nonnull UserType; +@property (strong) NSNumber * _Nonnull UserStatus; +@property (strong) NSNumber * _Nonnull TimeStamp; +@property (strong) NSString * _Nonnull Data; +@end + +@interface CHIPWindowCoveringClusterUpOrOpenPayload : NSObject +@end + +@interface CHIPWindowCoveringClusterDownOrClosePayload : NSObject +@end + +@interface CHIPWindowCoveringClusterStopMotionPayload : NSObject +@end + +@interface CHIPWindowCoveringClusterGoToLiftValuePayload : NSObject +@property (strong) NSNumber * _Nonnull LiftValue; +@end + +@interface CHIPWindowCoveringClusterGoToLiftPercentagePayload : NSObject +@property (strong) NSNumber * _Nonnull LiftPercentageValue; +@property (strong) NSNumber * _Nonnull LiftPercent100thsValue; +@end + +@interface CHIPWindowCoveringClusterGoToTiltValuePayload : NSObject +@property (strong) NSNumber * _Nonnull TiltValue; +@end + +@interface CHIPWindowCoveringClusterGoToTiltPercentagePayload : NSObject +@property (strong) NSNumber * _Nonnull TiltPercentageValue; +@property (strong) NSNumber * _Nonnull TiltPercent100thsValue; +@end + +@interface CHIPBarrierControlClusterBarrierControlGoToPercentPayload : NSObject +@property (strong) NSNumber * _Nonnull PercentOpen; +@end + +@interface CHIPBarrierControlClusterBarrierControlStopPayload : NSObject +@end + +@interface CHIPThermostatClusterSetpointRaiseLowerPayload : NSObject +@property (strong) NSNumber * _Nonnull Mode; +@property (strong) NSNumber * _Nonnull Amount; +@end + +@interface CHIPThermostatClusterCurrentWeeklySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull NumberOfTransitionsForSequence; +@property (strong) NSNumber * _Nonnull DayOfWeekForSequence; +@property (strong) NSNumber * _Nonnull ModeForSequence; +@property (strong) NSArray * _Nonnull Payload; +@end + +@interface CHIPThermostatClusterSetWeeklySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull NumberOfTransitionsForSequence; +@property (strong) NSNumber * _Nonnull DayOfWeekForSequence; +@property (strong) NSNumber * _Nonnull ModeForSequence; +@property (strong) NSArray * _Nonnull Payload; +@end + +@interface CHIPThermostatClusterRelayStatusLogPayload : NSObject +@property (strong) NSNumber * _Nonnull TimeOfDay; +@property (strong) NSNumber * _Nonnull RelayStatus; +@property (strong) NSNumber * _Nonnull LocalTemperature; +@property (strong) NSNumber * _Nonnull HumidityInPercentage; +@property (strong) NSNumber * _Nonnull Setpoint; +@property (strong) NSNumber * _Nonnull UnreadEntries; +@end + +@interface CHIPThermostatClusterGetWeeklySchedulePayload : NSObject +@property (strong) NSNumber * _Nonnull DaysToReturn; +@property (strong) NSNumber * _Nonnull ModeToReturn; +@end + +@interface CHIPThermostatClusterClearWeeklySchedulePayload : NSObject +@end + +@interface CHIPThermostatClusterGetRelayStatusLogPayload : NSObject +@end + +@interface CHIPColorControlClusterMoveToHuePayload : NSObject +@property (strong) NSNumber * _Nonnull Hue; +@property (strong) NSNumber * _Nonnull Direction; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterMoveHuePayload : NSObject +@property (strong) NSNumber * _Nonnull MoveMode; +@property (strong) NSNumber * _Nonnull Rate; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterStepHuePayload : NSObject +@property (strong) NSNumber * _Nonnull StepMode; +@property (strong) NSNumber * _Nonnull StepSize; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterMoveToSaturationPayload : NSObject +@property (strong) NSNumber * _Nonnull Saturation; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterMoveSaturationPayload : NSObject +@property (strong) NSNumber * _Nonnull MoveMode; +@property (strong) NSNumber * _Nonnull Rate; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterStepSaturationPayload : NSObject +@property (strong) NSNumber * _Nonnull StepMode; +@property (strong) NSNumber * _Nonnull StepSize; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterMoveToHueAndSaturationPayload : NSObject +@property (strong) NSNumber * _Nonnull Hue; +@property (strong) NSNumber * _Nonnull Saturation; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterMoveToColorPayload : NSObject +@property (strong) NSNumber * _Nonnull ColorX; +@property (strong) NSNumber * _Nonnull ColorY; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterMoveColorPayload : NSObject +@property (strong) NSNumber * _Nonnull RateX; +@property (strong) NSNumber * _Nonnull RateY; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterStepColorPayload : NSObject +@property (strong) NSNumber * _Nonnull StepX; +@property (strong) NSNumber * _Nonnull StepY; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterMoveToColorTemperaturePayload : NSObject +@property (strong) NSNumber * _Nonnull ColorTemperature; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterEnhancedMoveToHuePayload : NSObject +@property (strong) NSNumber * _Nonnull EnhancedHue; +@property (strong) NSNumber * _Nonnull Direction; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterEnhancedMoveHuePayload : NSObject +@property (strong) NSNumber * _Nonnull MoveMode; +@property (strong) NSNumber * _Nonnull Rate; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterEnhancedStepHuePayload : NSObject +@property (strong) NSNumber * _Nonnull StepMode; +@property (strong) NSNumber * _Nonnull StepSize; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterEnhancedMoveToHueAndSaturationPayload : NSObject +@property (strong) NSNumber * _Nonnull EnhancedHue; +@property (strong) NSNumber * _Nonnull Saturation; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterColorLoopSetPayload : NSObject +@property (strong) NSNumber * _Nonnull UpdateFlags; +@property (strong) NSNumber * _Nonnull Action; +@property (strong) NSNumber * _Nonnull Direction; +@property (strong) NSNumber * _Nonnull Time; +@property (strong) NSNumber * _Nonnull StartHue; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterStopMoveStepPayload : NSObject +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterMoveColorTemperaturePayload : NSObject +@property (strong) NSNumber * _Nonnull MoveMode; +@property (strong) NSNumber * _Nonnull Rate; +@property (strong) NSNumber * _Nonnull ColorTemperatureMinimum; +@property (strong) NSNumber * _Nonnull ColorTemperatureMaximum; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPColorControlClusterStepColorTemperaturePayload : NSObject +@property (strong) NSNumber * _Nonnull StepMode; +@property (strong) NSNumber * _Nonnull StepSize; +@property (strong) NSNumber * _Nonnull TransitionTime; +@property (strong) NSNumber * _Nonnull ColorTemperatureMinimum; +@property (strong) NSNumber * _Nonnull ColorTemperatureMaximum; +@property (strong) NSNumber * _Nonnull OptionsMask; +@property (strong) NSNumber * _Nonnull OptionsOverride; +@end + +@interface CHIPIasZoneClusterZoneEnrollResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull EnrollResponseCode; +@property (strong) NSNumber * _Nonnull ZoneId; +@end + +@interface CHIPIasZoneClusterZoneStatusChangeNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull ZoneStatus; +@property (strong) NSNumber * _Nonnull ExtendedStatus; +@property (strong) NSNumber * _Nonnull ZoneId; +@property (strong) NSNumber * _Nonnull Delay; +@end + +@interface CHIPIasZoneClusterInitiateNormalOperationModePayload : NSObject +@end + +@interface CHIPIasZoneClusterZoneEnrollRequestPayload : NSObject +@property (strong) NSNumber * _Nonnull ZoneType; +@property (strong) NSNumber * _Nonnull ManufacturerCode; +@end + +@interface CHIPIasZoneClusterInitiateTestModePayload : NSObject +@property (strong) NSNumber * _Nonnull TestModeDuration; +@property (strong) NSNumber * _Nonnull CurrentZoneSensitivityLevel; +@end + +@interface CHIPIasZoneClusterInitiateNormalOperationModeResponsePayload : NSObject +@end + +@interface CHIPIasZoneClusterInitiateTestModeResponsePayload : NSObject +@end + +@interface CHIPIasAceClusterArmPayload : NSObject +@property (strong) NSNumber * _Nonnull ArmMode; +@property (strong) NSString * _Nonnull ArmDisarmCode; +@property (strong) NSNumber * _Nonnull ZoneId; +@end + +@interface CHIPIasAceClusterArmResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ArmNotification; +@end + +@interface CHIPIasAceClusterBypassPayload : NSObject +@property (strong) NSNumber * _Nonnull NumberOfZones; +@property (strong) NSArray * _Nonnull ZoneIds; +@property (strong) NSString * _Nonnull ArmDisarmCode; +@end + +@interface CHIPIasAceClusterGetZoneIdMapResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Section0; +@property (strong) NSNumber * _Nonnull Section1; +@property (strong) NSNumber * _Nonnull Section2; +@property (strong) NSNumber * _Nonnull Section3; +@property (strong) NSNumber * _Nonnull Section4; +@property (strong) NSNumber * _Nonnull Section5; +@property (strong) NSNumber * _Nonnull Section6; +@property (strong) NSNumber * _Nonnull Section7; +@property (strong) NSNumber * _Nonnull Section8; +@property (strong) NSNumber * _Nonnull Section9; +@property (strong) NSNumber * _Nonnull Section10; +@property (strong) NSNumber * _Nonnull Section11; +@property (strong) NSNumber * _Nonnull Section12; +@property (strong) NSNumber * _Nonnull Section13; +@property (strong) NSNumber * _Nonnull Section14; +@property (strong) NSNumber * _Nonnull Section15; +@end + +@interface CHIPIasAceClusterEmergencyPayload : NSObject +@end + +@interface CHIPIasAceClusterGetZoneInformationResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ZoneId; +@property (strong) NSNumber * _Nonnull ZoneType; +@property (strong) NSNumber * _Nonnull IeeeAddress; +@property (strong) NSString * _Nonnull ZoneLabel; +@end + +@interface CHIPIasAceClusterFirePayload : NSObject +@end + +@interface CHIPIasAceClusterZoneStatusChangedPayload : NSObject +@property (strong) NSNumber * _Nonnull ZoneId; +@property (strong) NSNumber * _Nonnull ZoneStatus; +@property (strong) NSNumber * _Nonnull AudibleNotification; +@property (strong) NSString * _Nonnull ZoneLabel; +@end + +@interface CHIPIasAceClusterPanicPayload : NSObject +@end + +@interface CHIPIasAceClusterPanelStatusChangedPayload : NSObject +@property (strong) NSNumber * _Nonnull PanelStatus; +@property (strong) NSNumber * _Nonnull SecondsRemaining; +@property (strong) NSNumber * _Nonnull AudibleNotification; +@property (strong) NSNumber * _Nonnull AlarmStatus; +@end + +@interface CHIPIasAceClusterGetZoneIdMapPayload : NSObject +@end + +@interface CHIPIasAceClusterGetPanelStatusResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull PanelStatus; +@property (strong) NSNumber * _Nonnull SecondsRemaining; +@property (strong) NSNumber * _Nonnull AudibleNotification; +@property (strong) NSNumber * _Nonnull AlarmStatus; +@end + +@interface CHIPIasAceClusterGetZoneInformationPayload : NSObject +@property (strong) NSNumber * _Nonnull ZoneId; +@end + +@interface CHIPIasAceClusterSetBypassedZoneListPayload : NSObject +@property (strong) NSNumber * _Nonnull NumberOfZones; +@property (strong) NSArray * _Nonnull ZoneIds; +@end + +@interface CHIPIasAceClusterGetPanelStatusPayload : NSObject +@end + +@interface CHIPIasAceClusterBypassResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull NumberOfZones; +@property (strong) NSArray * _Nonnull BypassResult; +@end + +@interface CHIPIasAceClusterGetBypassedZoneListPayload : NSObject +@end + +@interface CHIPIasAceClusterGetZoneStatusResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ZoneStatusComplete; +@property (strong) NSNumber * _Nonnull NumberOfZones; +@property (strong) NSArray * _Nonnull ZoneStatusResult; +@end + +@interface CHIPIasAceClusterGetZoneStatusPayload : NSObject +@property (strong) NSNumber * _Nonnull StartingZoneId; +@property (strong) NSNumber * _Nonnull MaxNumberOfZoneIds; +@property (strong) NSNumber * _Nonnull ZoneStatusMaskFlag; +@property (strong) NSNumber * _Nonnull ZoneStatusMask; +@end + +@interface CHIPIasWdClusterStartWarningPayload : NSObject +@property (strong) NSNumber * _Nonnull WarningInfo; +@property (strong) NSNumber * _Nonnull WarningDuration; +@property (strong) NSNumber * _Nonnull StrobeDutyCycle; +@property (strong) NSNumber * _Nonnull StrobeLevel; +@end + +@interface CHIPIasWdClusterSquawkPayload : NSObject +@property (strong) NSNumber * _Nonnull SquawkInfo; +@end + +@interface CHIPTvChannelClusterChangeChannelPayload : NSObject +@property (strong) NSString * _Nonnull Match; +@end + +@interface CHIPTvChannelClusterChangeChannelResponsePayload : NSObject +@property (strong) NSArray * _Nonnull ChannelMatch; +@property (strong) NSNumber * _Nonnull ErrorType; +@end + +@interface CHIPTvChannelClusterChangeChannelByNumberPayload : NSObject +@property (strong) NSNumber * _Nonnull MajorNumber; +@property (strong) NSNumber * _Nonnull MinorNumber; +@end + +@interface CHIPTvChannelClusterSkipChannelPayload : NSObject +@property (strong) NSNumber * _Nonnull Count; +@end + +@interface CHIPTargetNavigatorClusterNavigateTargetPayload : NSObject +@property (strong) NSNumber * _Nonnull Target; +@property (strong) NSString * _Nonnull Data; +@end + +@interface CHIPTargetNavigatorClusterNavigateTargetResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSString * _Nonnull Data; +@end + +@interface CHIPMediaPlaybackClusterMediaPlayPayload : NSObject +@end + +@interface CHIPMediaPlaybackClusterMediaPlayResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull MediaPlaybackStatus; +@end + +@interface CHIPMediaPlaybackClusterMediaPausePayload : NSObject +@end + +@interface CHIPMediaPlaybackClusterMediaPauseResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull MediaPlaybackStatus; +@end + +@interface CHIPMediaPlaybackClusterMediaStopPayload : NSObject +@end + +@interface CHIPMediaPlaybackClusterMediaStopResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull MediaPlaybackStatus; +@end + +@interface CHIPMediaPlaybackClusterMediaStartOverPayload : NSObject +@end + +@interface CHIPMediaPlaybackClusterMediaStartOverResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull MediaPlaybackStatus; +@end + +@interface CHIPMediaPlaybackClusterMediaPreviousPayload : NSObject +@end + +@interface CHIPMediaPlaybackClusterMediaPreviousResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull MediaPlaybackStatus; +@end + +@interface CHIPMediaPlaybackClusterMediaNextPayload : NSObject +@end + +@interface CHIPMediaPlaybackClusterMediaNextResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull MediaPlaybackStatus; +@end + +@interface CHIPMediaPlaybackClusterMediaRewindPayload : NSObject +@end + +@interface CHIPMediaPlaybackClusterMediaRewindResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull MediaPlaybackStatus; +@end + +@interface CHIPMediaPlaybackClusterMediaFastForwardPayload : NSObject +@end + +@interface CHIPMediaPlaybackClusterMediaFastForwardResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull MediaPlaybackStatus; +@end + +@interface CHIPMediaPlaybackClusterMediaSkipForwardPayload : NSObject +@property (strong) NSNumber * _Nonnull DeltaPositionMilliseconds; +@end + +@interface CHIPMediaPlaybackClusterMediaSkipForwardResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull MediaPlaybackStatus; +@end + +@interface CHIPMediaPlaybackClusterMediaSkipBackwardPayload : NSObject +@property (strong) NSNumber * _Nonnull DeltaPositionMilliseconds; +@end + +@interface CHIPMediaPlaybackClusterMediaSkipBackwardResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull MediaPlaybackStatus; +@end + +@interface CHIPMediaPlaybackClusterMediaSeekPayload : NSObject +@property (strong) NSNumber * _Nonnull Position; +@end + +@interface CHIPMediaPlaybackClusterMediaSeekResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull MediaPlaybackStatus; +@end + +@interface CHIPMediaInputClusterSelectInputPayload : NSObject +@property (strong) NSNumber * _Nonnull Index; +@end + +@interface CHIPMediaInputClusterShowInputStatusPayload : NSObject +@end + +@interface CHIPMediaInputClusterHideInputStatusPayload : NSObject +@end + +@interface CHIPMediaInputClusterRenameInputPayload : NSObject +@property (strong) NSNumber * _Nonnull Index; +@property (strong) NSString * _Nonnull Name; +@end + +@interface CHIPLowPowerClusterSleepPayload : NSObject +@end + +@interface CHIPKeypadInputClusterSendKeyPayload : NSObject +@property (strong) NSNumber * _Nonnull KeyCode; +@end + +@interface CHIPKeypadInputClusterSendKeyResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPContentLauncherClusterLaunchContentPayload : NSObject +@property (strong) NSNumber * _Nonnull AutoPlay; +@property (strong) NSString * _Nonnull Data; +@end + +@interface CHIPContentLauncherClusterLaunchContentResponsePayload : NSObject +@property (strong) NSString * _Nonnull Data; +@property (strong) NSNumber * _Nonnull ContentLaunchStatus; +@end + +@interface CHIPContentLauncherClusterLaunchURLPayload : NSObject +@property (strong) NSString * _Nonnull ContentURL; +@property (strong) NSString * _Nonnull DisplayString; +@end + +@interface CHIPContentLauncherClusterLaunchURLResponsePayload : NSObject +@property (strong) NSString * _Nonnull Data; +@property (strong) NSNumber * _Nonnull ContentLaunchStatus; +@end + +@interface CHIPAudioOutputClusterSelectOutputPayload : NSObject +@property (strong) NSNumber * _Nonnull Index; +@end + +@interface CHIPAudioOutputClusterRenameOutputPayload : NSObject +@property (strong) NSNumber * _Nonnull Index; +@property (strong) NSString * _Nonnull Name; +@end + +@interface CHIPApplicationLauncherClusterLaunchAppPayload : NSObject +@property (strong) NSString * _Nonnull Data; +@property (strong) NSNumber * _Nonnull CatalogVendorId; +@property (strong) NSString * _Nonnull ApplicationId; +@end + +@interface CHIPApplicationLauncherClusterLaunchAppResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSString * _Nonnull Data; +@end + +@interface CHIPApplicationBasicClusterChangeStatusPayload : NSObject +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPAccountLoginClusterGetSetupPINPayload : NSObject +@property (strong) NSString * _Nonnull TempAccountIdentifier; +@end + +@interface CHIPAccountLoginClusterGetSetupPINResponsePayload : NSObject +@property (strong) NSString * _Nonnull SetupPIN; +@end + +@interface CHIPAccountLoginClusterLoginPayload : NSObject +@property (strong) NSString * _Nonnull TempAccountIdentifier; +@property (strong) NSString * _Nonnull SetupPIN; +@end + +@interface CHIPTestClusterClusterTestPayload : NSObject +@end + +@interface CHIPTestClusterClusterTestSpecificResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ReturnValue; +@end + +@interface CHIPTestClusterClusterTestNotHandledPayload : NSObject +@end + +@interface CHIPTestClusterClusterTestAddArgumentsResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ReturnValue; +@end + +@interface CHIPTestClusterClusterTestSpecificPayload : NSObject +@end + +@interface CHIPTestClusterClusterTestSimpleArgumentResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull ReturnValue; +@end + +@interface CHIPTestClusterClusterTestUnknownCommandPayload : NSObject +@end + +@interface CHIPTestClusterClusterTestStructArrayArgumentResponsePayload : NSObject +@property (strong) NSArray * _Nonnull Arg1; +@property (strong) NSArray * _Nonnull Arg2; +@property (strong) NSArray * _Nonnull Arg3; +@property (strong) NSArray * _Nonnull Arg4; +@property (strong) NSNumber * _Nonnull Arg5; +@property (strong) NSNumber * _Nonnull Arg6; +@end + +@interface CHIPTestClusterClusterTestAddArgumentsPayload : NSObject +@property (strong) NSNumber * _Nonnull Arg1; +@property (strong) NSNumber * _Nonnull Arg2; +@end + +@interface CHIPTestClusterClusterTestListInt8UReverseResponsePayload : NSObject +@property (strong) NSArray * _Nonnull Arg1; +@end + +@interface CHIPTestClusterClusterTestSimpleArgumentRequestPayload : NSObject +@property (strong) NSNumber * _Nonnull Arg1; +@end + +@interface CHIPTestClusterClusterTestEnumsResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Arg1; +@property (strong) NSNumber * _Nonnull Arg2; +@end + +@interface CHIPTestClusterClusterTestStructArrayArgumentRequestPayload : NSObject +@property (strong) NSArray * _Nonnull Arg1; +@property (strong) NSArray * _Nonnull Arg2; +@property (strong) NSArray * _Nonnull Arg3; +@property (strong) NSArray * _Nonnull Arg4; +@property (strong) NSNumber * _Nonnull Arg5; +@property (strong) NSNumber * _Nonnull Arg6; +@end + +@interface CHIPTestClusterClusterTestNullableOptionalResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull WasPresent; +@property (strong) NSNumber * _Nullable WasNull; +@property (strong) NSNumber * _Nullable Value; +@property (strong) NSNumber * _Nullable OriginalValue; +@end + +@interface CHIPTestClusterClusterTestStructArgumentRequestPayload : NSObject +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nonnull Arg1; +@end + +@interface CHIPTestClusterClusterTestComplexNullableOptionalResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull NullableIntWasNull; +@property (strong) NSNumber * _Nullable NullableIntValue; +@property (strong) NSNumber * _Nonnull OptionalIntWasPresent; +@property (strong) NSNumber * _Nullable OptionalIntValue; +@property (strong) NSNumber * _Nonnull NullableOptionalIntWasPresent; +@property (strong) NSNumber * _Nullable NullableOptionalIntWasNull; +@property (strong) NSNumber * _Nullable NullableOptionalIntValue; +@property (strong) NSNumber * _Nonnull NullableStringWasNull; +@property (strong) NSString * _Nullable NullableStringValue; +@property (strong) NSNumber * _Nonnull OptionalStringWasPresent; +@property (strong) NSString * _Nullable OptionalStringValue; +@property (strong) NSNumber * _Nonnull NullableOptionalStringWasPresent; +@property (strong) NSNumber * _Nullable NullableOptionalStringWasNull; +@property (strong) NSString * _Nullable NullableOptionalStringValue; +@property (strong) NSNumber * _Nonnull NullableStructWasNull; +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nullable NullableStructValue; +@property (strong) NSNumber * _Nonnull OptionalStructWasPresent; +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nullable OptionalStructValue; +@property (strong) NSNumber * _Nonnull NullableOptionalStructWasPresent; +@property (strong) NSNumber * _Nullable NullableOptionalStructWasNull; +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nullable NullableOptionalStructValue; +@property (strong) NSNumber * _Nonnull NullableListWasNull; +@property (strong) NSArray * _Nullable NullableListValue; +@property (strong) NSNumber * _Nonnull OptionalListWasPresent; +@property (strong) NSArray * _Nullable OptionalListValue; +@property (strong) NSNumber * _Nonnull NullableOptionalListWasPresent; +@property (strong) NSNumber * _Nullable NullableOptionalListWasNull; +@property (strong) NSArray * _Nullable NullableOptionalListValue; +@end + +@interface CHIPTestClusterClusterTestNestedStructArgumentRequestPayload : NSObject +@property (strong) CHIPTestClusterClusterNestedStruct * _Nonnull Arg1; +@end + +@interface CHIPTestClusterClusterBooleanResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull Value; +@end + +@interface CHIPTestClusterClusterTestListStructArgumentRequestPayload : NSObject +@property (strong) NSArray * _Nonnull Arg1; +@end + +@interface CHIPTestClusterClusterTestListInt8UArgumentRequestPayload : NSObject +@property (strong) NSArray * _Nonnull Arg1; +@end + +@interface CHIPTestClusterClusterTestNestedStructListArgumentRequestPayload : NSObject +@property (strong) CHIPTestClusterClusterNestedStructList * _Nonnull Arg1; +@end + +@interface CHIPTestClusterClusterTestListNestedStructListArgumentRequestPayload : NSObject +@property (strong) NSArray * _Nonnull Arg1; +@end + +@interface CHIPTestClusterClusterTestListInt8UReverseRequestPayload : NSObject +@property (strong) NSArray * _Nonnull Arg1; +@end + +@interface CHIPTestClusterClusterTestEnumsRequestPayload : NSObject +@property (strong) NSNumber * _Nonnull Arg1; +@property (strong) NSNumber * _Nonnull Arg2; +@end + +@interface CHIPTestClusterClusterTestNullableOptionalRequestPayload : NSObject +@property (strong) NSNumber * _Nullable Arg1; +@end + +@interface CHIPTestClusterClusterTestComplexNullableOptionalRequestPayload : NSObject +@property (strong) NSNumber * _Nullable NullableInt; +@property (strong) NSNumber * _Nullable OptionalInt; +@property (strong) NSNumber * _Nullable NullableOptionalInt; +@property (strong) NSString * _Nullable NullableString; +@property (strong) NSString * _Nullable OptionalString; +@property (strong) NSString * _Nullable NullableOptionalString; +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nullable NullableStruct; +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nullable OptionalStruct; +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nullable NullableOptionalStruct; +@property (strong) NSArray * _Nullable NullableList; +@property (strong) NSArray * _Nullable OptionalList; +@property (strong) NSArray * _Nullable NullableOptionalList; +@end + +@interface CHIPMessagingClusterDisplayMessagePayload : NSObject +@property (strong) NSNumber * _Nonnull MessageId; +@property (strong) NSNumber * _Nonnull MessageControl; +@property (strong) NSNumber * _Nonnull StartTime; +@property (strong) NSNumber * _Nonnull DurationInMinutes; +@property (strong) NSString * _Nonnull Message; +@property (strong) NSNumber * _Nonnull OptionalExtendedMessageControl; +@end + +@interface CHIPMessagingClusterGetLastMessagePayload : NSObject +@end + +@interface CHIPMessagingClusterCancelMessagePayload : NSObject +@property (strong) NSNumber * _Nonnull MessageId; +@property (strong) NSNumber * _Nonnull MessageControl; +@end + +@interface CHIPMessagingClusterMessageConfirmationPayload : NSObject +@property (strong) NSNumber * _Nonnull MessageId; +@property (strong) NSNumber * _Nonnull ConfirmationTime; +@property (strong) NSNumber * _Nonnull MessageConfirmationControl; +@property (strong) NSData * _Nonnull MessageResponse; +@end + +@interface CHIPMessagingClusterDisplayProtectedMessagePayload : NSObject +@property (strong) NSNumber * _Nonnull MessageId; +@property (strong) NSNumber * _Nonnull MessageControl; +@property (strong) NSNumber * _Nonnull StartTime; +@property (strong) NSNumber * _Nonnull DurationInMinutes; +@property (strong) NSString * _Nonnull Message; +@property (strong) NSNumber * _Nonnull OptionalExtendedMessageControl; +@end + +@interface CHIPMessagingClusterGetMessageCancellationPayload : NSObject +@property (strong) NSNumber * _Nonnull EarliestImplementationTime; +@end + +@interface CHIPMessagingClusterCancelAllMessagesPayload : NSObject +@property (strong) NSNumber * _Nonnull ImplementationDateTime; +@end + +@interface CHIPApplianceEventsAndAlertClusterGetAlertsPayload : NSObject +@end + +@interface CHIPApplianceEventsAndAlertClusterGetAlertsResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull AlertsCount; +@property (strong) NSArray * _Nonnull AlertStructures; +@end + +@interface CHIPApplianceEventsAndAlertClusterAlertsNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull AlertsCount; +@property (strong) NSArray * _Nonnull AlertStructures; +@end + +@interface CHIPApplianceEventsAndAlertClusterEventsNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull EventHeader; +@property (strong) NSNumber * _Nonnull EventId; +@end + +@interface CHIPApplianceStatisticsClusterLogNotificationPayload : NSObject +@property (strong) NSNumber * _Nonnull TimeStamp; +@property (strong) NSNumber * _Nonnull LogId; +@property (strong) NSNumber * _Nonnull LogLength; +@property (strong) NSArray * _Nonnull LogPayload; +@end + +@interface CHIPApplianceStatisticsClusterLogRequestPayload : NSObject +@property (strong) NSNumber * _Nonnull LogId; +@end + +@interface CHIPApplianceStatisticsClusterLogResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull TimeStamp; +@property (strong) NSNumber * _Nonnull LogId; +@property (strong) NSNumber * _Nonnull LogLength; +@property (strong) NSArray * _Nonnull LogPayload; +@end + +@interface CHIPApplianceStatisticsClusterLogQueueRequestPayload : NSObject +@end + +@interface CHIPApplianceStatisticsClusterLogQueueResponsePayload : NSObject +@property (strong) NSNumber * _Nonnull LogQueueSize; +@property (strong) NSArray * _Nonnull LogIds; +@end + +@interface CHIPApplianceStatisticsClusterStatisticsAvailablePayload : NSObject +@property (strong) NSNumber * _Nonnull LogQueueSize; +@property (strong) NSArray * _Nonnull LogIds; +@end + +@interface CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandPayload : NSObject +@property (strong) NSNumber * _Nonnull ProfileCount; +@property (strong) NSNumber * _Nonnull ProfileIntervalPeriod; +@property (strong) NSNumber * _Nonnull MaxNumberOfIntervals; +@property (strong) NSArray * _Nonnull ListOfAttributes; +@end + +@interface CHIPElectricalMeasurementClusterGetProfileInfoCommandPayload : NSObject +@end + +@interface CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandPayload : NSObject +@property (strong) NSNumber * _Nonnull StartTime; +@property (strong) NSNumber * _Nonnull Status; +@property (strong) NSNumber * _Nonnull ProfileIntervalPeriod; +@property (strong) NSNumber * _Nonnull NumberOfIntervalsDelivered; +@property (strong) NSNumber * _Nonnull AttributeId; +@property (strong) NSArray * _Nonnull Intervals; +@end + +@interface CHIPElectricalMeasurementClusterGetMeasurementProfileCommandPayload : NSObject +@property (strong) NSNumber * _Nonnull AttributeId; +@property (strong) NSNumber * _Nonnull StartTime; +@property (strong) NSNumber * _Nonnull NumberOfIntervals; +@end + +@interface CHIPBindingClusterBindPayload : NSObject +@property (strong) NSNumber * _Nonnull NodeId; +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull EndpointId; +@property (strong) NSNumber * _Nonnull ClusterId; +@end + +@interface CHIPBindingClusterUnbindPayload : NSObject +@property (strong) NSNumber * _Nonnull NodeId; +@property (strong) NSNumber * _Nonnull GroupId; +@property (strong) NSNumber * _Nonnull EndpointId; +@property (strong) NSNumber * _Nonnull ClusterId; +@end + +@interface CHIPSampleMfgSpecificClusterClusterCommandOnePayload : NSObject +@property (strong) NSNumber * _Nonnull ArgOne; +@end + +@interface CHIPSampleMfgSpecificCluster2ClusterCommandTwoPayload : NSObject +@property (strong) NSNumber * _Nonnull ArgOne; +@end + +#endif /* CHIP_COMMAND_PAYLOADS_H */ diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm new file mode 100644 index 00000000000000..e9524b99618350 --- /dev/null +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm @@ -0,0 +1,1154 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#import "CHIPCommandPayloadsObjc.h" + +@implementation CHIPIdentifyClusterIdentifyPayload +@end + +@implementation CHIPIdentifyClusterIdentifyQueryResponsePayload +@end + +@implementation CHIPIdentifyClusterIdentifyQueryPayload +@end + +@implementation CHIPIdentifyClusterTriggerEffectPayload +@end + +@implementation CHIPGroupsClusterAddGroupPayload +@end + +@implementation CHIPGroupsClusterAddGroupResponsePayload +@end + +@implementation CHIPGroupsClusterViewGroupPayload +@end + +@implementation CHIPGroupsClusterViewGroupResponsePayload +@end + +@implementation CHIPGroupsClusterGetGroupMembershipPayload +@end + +@implementation CHIPGroupsClusterGetGroupMembershipResponsePayload +@end + +@implementation CHIPGroupsClusterRemoveGroupPayload +@end + +@implementation CHIPGroupsClusterRemoveGroupResponsePayload +@end + +@implementation CHIPGroupsClusterRemoveAllGroupsPayload +@end + +@implementation CHIPGroupsClusterAddGroupIfIdentifyingPayload +@end + +@implementation CHIPScenesClusterAddScenePayload +@end + +@implementation CHIPScenesClusterAddSceneResponsePayload +@end + +@implementation CHIPScenesClusterViewScenePayload +@end + +@implementation CHIPScenesClusterViewSceneResponsePayload +@end + +@implementation CHIPScenesClusterRemoveScenePayload +@end + +@implementation CHIPScenesClusterRemoveSceneResponsePayload +@end + +@implementation CHIPScenesClusterRemoveAllScenesPayload +@end + +@implementation CHIPScenesClusterRemoveAllScenesResponsePayload +@end + +@implementation CHIPScenesClusterStoreScenePayload +@end + +@implementation CHIPScenesClusterStoreSceneResponsePayload +@end + +@implementation CHIPScenesClusterRecallScenePayload +@end + +@implementation CHIPScenesClusterGetSceneMembershipPayload +@end + +@implementation CHIPScenesClusterGetSceneMembershipResponsePayload +@end + +@implementation CHIPScenesClusterEnhancedAddScenePayload +@end + +@implementation CHIPScenesClusterEnhancedAddSceneResponsePayload +@end + +@implementation CHIPScenesClusterEnhancedViewScenePayload +@end + +@implementation CHIPScenesClusterEnhancedViewSceneResponsePayload +@end + +@implementation CHIPScenesClusterCopyScenePayload +@end + +@implementation CHIPScenesClusterCopySceneResponsePayload +@end + +@implementation CHIPOnOffClusterOffPayload +@end + +@implementation CHIPOnOffClusterSampleMfgSpecificOffWithTransitionPayload +@end + +@implementation CHIPOnOffClusterOnPayload +@end + +@implementation CHIPOnOffClusterSampleMfgSpecificOnWithTransitionPayload +@end + +@implementation CHIPOnOffClusterSampleMfgSpecificOnWithTransition2Payload +@end + +@implementation CHIPOnOffClusterTogglePayload +@end + +@implementation CHIPOnOffClusterSampleMfgSpecificToggleWithTransitionPayload +@end + +@implementation CHIPOnOffClusterSampleMfgSpecificToggleWithTransition2Payload +@end + +@implementation CHIPOnOffClusterOffWithEffectPayload +@end + +@implementation CHIPOnOffClusterOnWithRecallGlobalScenePayload +@end + +@implementation CHIPOnOffClusterOnWithTimedOffPayload +@end + +@implementation CHIPLevelControlClusterMoveToLevelPayload +@end + +@implementation CHIPLevelControlClusterMovePayload +@end + +@implementation CHIPLevelControlClusterStepPayload +@end + +@implementation CHIPLevelControlClusterStopPayload +@end + +@implementation CHIPLevelControlClusterMoveToLevelWithOnOffPayload +@end + +@implementation CHIPLevelControlClusterMoveWithOnOffPayload +@end + +@implementation CHIPLevelControlClusterStepWithOnOffPayload +@end + +@implementation CHIPLevelControlClusterStopWithOnOffPayload +@end + +@implementation CHIPAlarmsClusterResetAlarmPayload +@end + +@implementation CHIPAlarmsClusterAlarmPayload +@end + +@implementation CHIPAlarmsClusterResetAllAlarmsPayload +@end + +@implementation CHIPAlarmsClusterGetAlarmResponsePayload +@end + +@implementation CHIPAlarmsClusterGetAlarmPayload +@end + +@implementation CHIPAlarmsClusterResetAlarmLogPayload +@end + +@implementation CHIPPowerProfileClusterPowerProfileRequestPayload +@end + +@implementation CHIPPowerProfileClusterPowerProfileNotificationPayload +@end + +@implementation CHIPPowerProfileClusterPowerProfileStateRequestPayload +@end + +@implementation CHIPPowerProfileClusterPowerProfileResponsePayload +@end + +@implementation CHIPPowerProfileClusterGetPowerProfilePriceResponsePayload +@end + +@implementation CHIPPowerProfileClusterPowerProfileStateResponsePayload +@end + +@implementation CHIPPowerProfileClusterGetOverallSchedulePriceResponsePayload +@end + +@implementation CHIPPowerProfileClusterGetPowerProfilePricePayload +@end + +@implementation CHIPPowerProfileClusterEnergyPhasesScheduleNotificationPayload +@end + +@implementation CHIPPowerProfileClusterPowerProfilesStateNotificationPayload +@end + +@implementation CHIPPowerProfileClusterEnergyPhasesScheduleResponsePayload +@end + +@implementation CHIPPowerProfileClusterGetOverallSchedulePricePayload +@end + +@implementation CHIPPowerProfileClusterPowerProfileScheduleConstraintsRequestPayload +@end + +@implementation CHIPPowerProfileClusterEnergyPhasesScheduleRequestPayload +@end + +@implementation CHIPPowerProfileClusterEnergyPhasesScheduleStateRequestPayload +@end + +@implementation CHIPPowerProfileClusterEnergyPhasesScheduleStateResponsePayload +@end + +@implementation CHIPPowerProfileClusterGetPowerProfilePriceExtendedResponsePayload +@end + +@implementation CHIPPowerProfileClusterEnergyPhasesScheduleStateNotificationPayload +@end + +@implementation CHIPPowerProfileClusterPowerProfileScheduleConstraintsNotificationPayload +@end + +@implementation CHIPPowerProfileClusterPowerProfileScheduleConstraintsResponsePayload +@end + +@implementation CHIPPowerProfileClusterGetPowerProfilePriceExtendedPayload +@end + +@implementation CHIPApplianceControlClusterExecutionOfACommandPayload +@end + +@implementation CHIPApplianceControlClusterSignalStateResponsePayload +@end + +@implementation CHIPApplianceControlClusterSignalStatePayload +@end + +@implementation CHIPApplianceControlClusterSignalStateNotificationPayload +@end + +@implementation CHIPApplianceControlClusterWriteFunctionsPayload +@end + +@implementation CHIPApplianceControlClusterOverloadPauseResumePayload +@end + +@implementation CHIPApplianceControlClusterOverloadPausePayload +@end + +@implementation CHIPApplianceControlClusterOverloadWarningPayload +@end + +@implementation CHIPPollControlClusterCheckInPayload +@end + +@implementation CHIPPollControlClusterCheckInResponsePayload +@end + +@implementation CHIPPollControlClusterFastPollStopPayload +@end + +@implementation CHIPPollControlClusterSetLongPollIntervalPayload +@end + +@implementation CHIPPollControlClusterSetShortPollIntervalPayload +@end + +@implementation CHIPBridgedActionsClusterInstantActionPayload +@end + +@implementation CHIPBridgedActionsClusterInstantActionWithTransitionPayload +@end + +@implementation CHIPBridgedActionsClusterStartActionPayload +@end + +@implementation CHIPBridgedActionsClusterStartActionWithDurationPayload +@end + +@implementation CHIPBridgedActionsClusterStopActionPayload +@end + +@implementation CHIPBridgedActionsClusterPauseActionPayload +@end + +@implementation CHIPBridgedActionsClusterPauseActionWithDurationPayload +@end + +@implementation CHIPBridgedActionsClusterResumeActionPayload +@end + +@implementation CHIPBridgedActionsClusterEnableActionPayload +@end + +@implementation CHIPBridgedActionsClusterEnableActionWithDurationPayload +@end + +@implementation CHIPBridgedActionsClusterDisableActionPayload +@end + +@implementation CHIPBridgedActionsClusterDisableActionWithDurationPayload +@end + +@implementation CHIPBasicClusterStartUpPayload +@end + +@implementation CHIPBasicClusterMfgSpecificPingPayload +@end + +@implementation CHIPBasicClusterShutDownPayload +@end + +@implementation CHIPBasicClusterLeavePayload +@end + +@implementation CHIPOtaSoftwareUpdateProviderClusterQueryImagePayload +@end + +@implementation CHIPOtaSoftwareUpdateProviderClusterApplyUpdateRequestPayload +@end + +@implementation CHIPOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedPayload +@end + +@implementation CHIPOtaSoftwareUpdateProviderClusterQueryImageResponsePayload +@end + +@implementation CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponsePayload +@end + +@implementation CHIPOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderPayload +@end + +@implementation CHIPGeneralCommissioningClusterArmFailSafePayload +@end + +@implementation CHIPGeneralCommissioningClusterArmFailSafeResponsePayload +@end + +@implementation CHIPGeneralCommissioningClusterSetRegulatoryConfigPayload +@end + +@implementation CHIPGeneralCommissioningClusterSetRegulatoryConfigResponsePayload +@end + +@implementation CHIPGeneralCommissioningClusterCommissioningCompletePayload +@end + +@implementation CHIPGeneralCommissioningClusterCommissioningCompleteResponsePayload +@end + +@implementation CHIPNetworkCommissioningClusterScanNetworksPayload +@end + +@implementation CHIPNetworkCommissioningClusterScanNetworksResponsePayload +@end + +@implementation CHIPNetworkCommissioningClusterAddWiFiNetworkPayload +@end + +@implementation CHIPNetworkCommissioningClusterAddWiFiNetworkResponsePayload +@end + +@implementation CHIPNetworkCommissioningClusterUpdateWiFiNetworkPayload +@end + +@implementation CHIPNetworkCommissioningClusterUpdateWiFiNetworkResponsePayload +@end + +@implementation CHIPNetworkCommissioningClusterAddThreadNetworkPayload +@end + +@implementation CHIPNetworkCommissioningClusterAddThreadNetworkResponsePayload +@end + +@implementation CHIPNetworkCommissioningClusterUpdateThreadNetworkPayload +@end + +@implementation CHIPNetworkCommissioningClusterUpdateThreadNetworkResponsePayload +@end + +@implementation CHIPNetworkCommissioningClusterRemoveNetworkPayload +@end + +@implementation CHIPNetworkCommissioningClusterRemoveNetworkResponsePayload +@end + +@implementation CHIPNetworkCommissioningClusterEnableNetworkPayload +@end + +@implementation CHIPNetworkCommissioningClusterEnableNetworkResponsePayload +@end + +@implementation CHIPNetworkCommissioningClusterDisableNetworkPayload +@end + +@implementation CHIPNetworkCommissioningClusterDisableNetworkResponsePayload +@end + +@implementation CHIPDiagnosticLogsClusterRetrieveLogsRequestPayload +@end + +@implementation CHIPDiagnosticLogsClusterRetrieveLogsResponsePayload +@end + +@implementation CHIPSoftwareDiagnosticsClusterResetWatermarksPayload +@end + +@implementation CHIPThreadNetworkDiagnosticsClusterResetCountsPayload +@end + +@implementation CHIPWiFiNetworkDiagnosticsClusterResetCountsPayload +@end + +@implementation CHIPEthernetNetworkDiagnosticsClusterResetCountsPayload +@end + +@implementation CHIPBridgedDeviceBasicClusterStartUpPayload +@end + +@implementation CHIPBridgedDeviceBasicClusterShutDownPayload +@end + +@implementation CHIPBridgedDeviceBasicClusterLeavePayload +@end + +@implementation CHIPBridgedDeviceBasicClusterReachableChangedPayload +@end + +@implementation CHIPAdministratorCommissioningClusterOpenCommissioningWindowPayload +@end + +@implementation CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowPayload +@end + +@implementation CHIPAdministratorCommissioningClusterRevokeCommissioningPayload +@end + +@implementation CHIPOperationalCredentialsClusterAttestationRequestPayload +@end + +@implementation CHIPOperationalCredentialsClusterAttestationResponsePayload +@end + +@implementation CHIPOperationalCredentialsClusterCertificateChainRequestPayload +@end + +@implementation CHIPOperationalCredentialsClusterCertificateChainResponsePayload +@end + +@implementation CHIPOperationalCredentialsClusterOpCSRRequestPayload +@end + +@implementation CHIPOperationalCredentialsClusterOpCSRResponsePayload +@end + +@implementation CHIPOperationalCredentialsClusterAddNOCPayload +@end + +@implementation CHIPOperationalCredentialsClusterUpdateNOCPayload +@end + +@implementation CHIPOperationalCredentialsClusterNOCResponsePayload +@end + +@implementation CHIPOperationalCredentialsClusterUpdateFabricLabelPayload +@end + +@implementation CHIPOperationalCredentialsClusterRemoveFabricPayload +@end + +@implementation CHIPOperationalCredentialsClusterAddTrustedRootCertificatePayload +@end + +@implementation CHIPOperationalCredentialsClusterRemoveTrustedRootCertificatePayload +@end + +@implementation CHIPModeSelectClusterChangeToModePayload +@end + +@implementation CHIPDoorLockClusterLockDoorPayload +@end + +@implementation CHIPDoorLockClusterLockDoorResponsePayload +@end + +@implementation CHIPDoorLockClusterUnlockDoorPayload +@end + +@implementation CHIPDoorLockClusterUnlockDoorResponsePayload +@end + +@implementation CHIPDoorLockClusterTogglePayload +@end + +@implementation CHIPDoorLockClusterToggleResponsePayload +@end + +@implementation CHIPDoorLockClusterUnlockWithTimeoutPayload +@end + +@implementation CHIPDoorLockClusterUnlockWithTimeoutResponsePayload +@end + +@implementation CHIPDoorLockClusterGetLogRecordPayload +@end + +@implementation CHIPDoorLockClusterGetLogRecordResponsePayload +@end + +@implementation CHIPDoorLockClusterSetPinPayload +@end + +@implementation CHIPDoorLockClusterSetPinResponsePayload +@end + +@implementation CHIPDoorLockClusterGetPinPayload +@end + +@implementation CHIPDoorLockClusterGetPinResponsePayload +@end + +@implementation CHIPDoorLockClusterClearPinPayload +@end + +@implementation CHIPDoorLockClusterClearPinResponsePayload +@end + +@implementation CHIPDoorLockClusterClearAllPinsPayload +@end + +@implementation CHIPDoorLockClusterClearAllPinsResponsePayload +@end + +@implementation CHIPDoorLockClusterSetUserStatusPayload +@end + +@implementation CHIPDoorLockClusterSetUserStatusResponsePayload +@end + +@implementation CHIPDoorLockClusterGetUserStatusPayload +@end + +@implementation CHIPDoorLockClusterGetUserStatusResponsePayload +@end + +@implementation CHIPDoorLockClusterSetWeekdaySchedulePayload +@end + +@implementation CHIPDoorLockClusterSetWeekdayScheduleResponsePayload +@end + +@implementation CHIPDoorLockClusterGetWeekdaySchedulePayload +@end + +@implementation CHIPDoorLockClusterGetWeekdayScheduleResponsePayload +@end + +@implementation CHIPDoorLockClusterClearWeekdaySchedulePayload +@end + +@implementation CHIPDoorLockClusterClearWeekdayScheduleResponsePayload +@end + +@implementation CHIPDoorLockClusterSetYeardaySchedulePayload +@end + +@implementation CHIPDoorLockClusterSetYeardayScheduleResponsePayload +@end + +@implementation CHIPDoorLockClusterGetYeardaySchedulePayload +@end + +@implementation CHIPDoorLockClusterGetYeardayScheduleResponsePayload +@end + +@implementation CHIPDoorLockClusterClearYeardaySchedulePayload +@end + +@implementation CHIPDoorLockClusterClearYeardayScheduleResponsePayload +@end + +@implementation CHIPDoorLockClusterSetHolidaySchedulePayload +@end + +@implementation CHIPDoorLockClusterSetHolidayScheduleResponsePayload +@end + +@implementation CHIPDoorLockClusterGetHolidaySchedulePayload +@end + +@implementation CHIPDoorLockClusterGetHolidayScheduleResponsePayload +@end + +@implementation CHIPDoorLockClusterClearHolidaySchedulePayload +@end + +@implementation CHIPDoorLockClusterClearHolidayScheduleResponsePayload +@end + +@implementation CHIPDoorLockClusterSetUserTypePayload +@end + +@implementation CHIPDoorLockClusterSetUserTypeResponsePayload +@end + +@implementation CHIPDoorLockClusterGetUserTypePayload +@end + +@implementation CHIPDoorLockClusterGetUserTypeResponsePayload +@end + +@implementation CHIPDoorLockClusterSetRfidPayload +@end + +@implementation CHIPDoorLockClusterSetRfidResponsePayload +@end + +@implementation CHIPDoorLockClusterGetRfidPayload +@end + +@implementation CHIPDoorLockClusterGetRfidResponsePayload +@end + +@implementation CHIPDoorLockClusterClearRfidPayload +@end + +@implementation CHIPDoorLockClusterClearRfidResponsePayload +@end + +@implementation CHIPDoorLockClusterClearAllRfidsPayload +@end + +@implementation CHIPDoorLockClusterClearAllRfidsResponsePayload +@end + +@implementation CHIPDoorLockClusterOperationEventNotificationPayload +@end + +@implementation CHIPDoorLockClusterProgrammingEventNotificationPayload +@end + +@implementation CHIPWindowCoveringClusterUpOrOpenPayload +@end + +@implementation CHIPWindowCoveringClusterDownOrClosePayload +@end + +@implementation CHIPWindowCoveringClusterStopMotionPayload +@end + +@implementation CHIPWindowCoveringClusterGoToLiftValuePayload +@end + +@implementation CHIPWindowCoveringClusterGoToLiftPercentagePayload +@end + +@implementation CHIPWindowCoveringClusterGoToTiltValuePayload +@end + +@implementation CHIPWindowCoveringClusterGoToTiltPercentagePayload +@end + +@implementation CHIPBarrierControlClusterBarrierControlGoToPercentPayload +@end + +@implementation CHIPBarrierControlClusterBarrierControlStopPayload +@end + +@implementation CHIPThermostatClusterSetpointRaiseLowerPayload +@end + +@implementation CHIPThermostatClusterCurrentWeeklySchedulePayload +@end + +@implementation CHIPThermostatClusterSetWeeklySchedulePayload +@end + +@implementation CHIPThermostatClusterRelayStatusLogPayload +@end + +@implementation CHIPThermostatClusterGetWeeklySchedulePayload +@end + +@implementation CHIPThermostatClusterClearWeeklySchedulePayload +@end + +@implementation CHIPThermostatClusterGetRelayStatusLogPayload +@end + +@implementation CHIPColorControlClusterMoveToHuePayload +@end + +@implementation CHIPColorControlClusterMoveHuePayload +@end + +@implementation CHIPColorControlClusterStepHuePayload +@end + +@implementation CHIPColorControlClusterMoveToSaturationPayload +@end + +@implementation CHIPColorControlClusterMoveSaturationPayload +@end + +@implementation CHIPColorControlClusterStepSaturationPayload +@end + +@implementation CHIPColorControlClusterMoveToHueAndSaturationPayload +@end + +@implementation CHIPColorControlClusterMoveToColorPayload +@end + +@implementation CHIPColorControlClusterMoveColorPayload +@end + +@implementation CHIPColorControlClusterStepColorPayload +@end + +@implementation CHIPColorControlClusterMoveToColorTemperaturePayload +@end + +@implementation CHIPColorControlClusterEnhancedMoveToHuePayload +@end + +@implementation CHIPColorControlClusterEnhancedMoveHuePayload +@end + +@implementation CHIPColorControlClusterEnhancedStepHuePayload +@end + +@implementation CHIPColorControlClusterEnhancedMoveToHueAndSaturationPayload +@end + +@implementation CHIPColorControlClusterColorLoopSetPayload +@end + +@implementation CHIPColorControlClusterStopMoveStepPayload +@end + +@implementation CHIPColorControlClusterMoveColorTemperaturePayload +@end + +@implementation CHIPColorControlClusterStepColorTemperaturePayload +@end + +@implementation CHIPIasZoneClusterZoneEnrollResponsePayload +@end + +@implementation CHIPIasZoneClusterZoneStatusChangeNotificationPayload +@end + +@implementation CHIPIasZoneClusterInitiateNormalOperationModePayload +@end + +@implementation CHIPIasZoneClusterZoneEnrollRequestPayload +@end + +@implementation CHIPIasZoneClusterInitiateTestModePayload +@end + +@implementation CHIPIasZoneClusterInitiateNormalOperationModeResponsePayload +@end + +@implementation CHIPIasZoneClusterInitiateTestModeResponsePayload +@end + +@implementation CHIPIasAceClusterArmPayload +@end + +@implementation CHIPIasAceClusterArmResponsePayload +@end + +@implementation CHIPIasAceClusterBypassPayload +@end + +@implementation CHIPIasAceClusterGetZoneIdMapResponsePayload +@end + +@implementation CHIPIasAceClusterEmergencyPayload +@end + +@implementation CHIPIasAceClusterGetZoneInformationResponsePayload +@end + +@implementation CHIPIasAceClusterFirePayload +@end + +@implementation CHIPIasAceClusterZoneStatusChangedPayload +@end + +@implementation CHIPIasAceClusterPanicPayload +@end + +@implementation CHIPIasAceClusterPanelStatusChangedPayload +@end + +@implementation CHIPIasAceClusterGetZoneIdMapPayload +@end + +@implementation CHIPIasAceClusterGetPanelStatusResponsePayload +@end + +@implementation CHIPIasAceClusterGetZoneInformationPayload +@end + +@implementation CHIPIasAceClusterSetBypassedZoneListPayload +@end + +@implementation CHIPIasAceClusterGetPanelStatusPayload +@end + +@implementation CHIPIasAceClusterBypassResponsePayload +@end + +@implementation CHIPIasAceClusterGetBypassedZoneListPayload +@end + +@implementation CHIPIasAceClusterGetZoneStatusResponsePayload +@end + +@implementation CHIPIasAceClusterGetZoneStatusPayload +@end + +@implementation CHIPIasWdClusterStartWarningPayload +@end + +@implementation CHIPIasWdClusterSquawkPayload +@end + +@implementation CHIPTvChannelClusterChangeChannelPayload +@end + +@implementation CHIPTvChannelClusterChangeChannelResponsePayload +@end + +@implementation CHIPTvChannelClusterChangeChannelByNumberPayload +@end + +@implementation CHIPTvChannelClusterSkipChannelPayload +@end + +@implementation CHIPTargetNavigatorClusterNavigateTargetPayload +@end + +@implementation CHIPTargetNavigatorClusterNavigateTargetResponsePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaPlayPayload +@end + +@implementation CHIPMediaPlaybackClusterMediaPlayResponsePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaPausePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaPauseResponsePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaStopPayload +@end + +@implementation CHIPMediaPlaybackClusterMediaStopResponsePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaStartOverPayload +@end + +@implementation CHIPMediaPlaybackClusterMediaStartOverResponsePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaPreviousPayload +@end + +@implementation CHIPMediaPlaybackClusterMediaPreviousResponsePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaNextPayload +@end + +@implementation CHIPMediaPlaybackClusterMediaNextResponsePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaRewindPayload +@end + +@implementation CHIPMediaPlaybackClusterMediaRewindResponsePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaFastForwardPayload +@end + +@implementation CHIPMediaPlaybackClusterMediaFastForwardResponsePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaSkipForwardPayload +@end + +@implementation CHIPMediaPlaybackClusterMediaSkipForwardResponsePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaSkipBackwardPayload +@end + +@implementation CHIPMediaPlaybackClusterMediaSkipBackwardResponsePayload +@end + +@implementation CHIPMediaPlaybackClusterMediaSeekPayload +@end + +@implementation CHIPMediaPlaybackClusterMediaSeekResponsePayload +@end + +@implementation CHIPMediaInputClusterSelectInputPayload +@end + +@implementation CHIPMediaInputClusterShowInputStatusPayload +@end + +@implementation CHIPMediaInputClusterHideInputStatusPayload +@end + +@implementation CHIPMediaInputClusterRenameInputPayload +@end + +@implementation CHIPLowPowerClusterSleepPayload +@end + +@implementation CHIPKeypadInputClusterSendKeyPayload +@end + +@implementation CHIPKeypadInputClusterSendKeyResponsePayload +@end + +@implementation CHIPContentLauncherClusterLaunchContentPayload +@end + +@implementation CHIPContentLauncherClusterLaunchContentResponsePayload +@end + +@implementation CHIPContentLauncherClusterLaunchURLPayload +@end + +@implementation CHIPContentLauncherClusterLaunchURLResponsePayload +@end + +@implementation CHIPAudioOutputClusterSelectOutputPayload +@end + +@implementation CHIPAudioOutputClusterRenameOutputPayload +@end + +@implementation CHIPApplicationLauncherClusterLaunchAppPayload +@end + +@implementation CHIPApplicationLauncherClusterLaunchAppResponsePayload +@end + +@implementation CHIPApplicationBasicClusterChangeStatusPayload +@end + +@implementation CHIPAccountLoginClusterGetSetupPINPayload +@end + +@implementation CHIPAccountLoginClusterGetSetupPINResponsePayload +@end + +@implementation CHIPAccountLoginClusterLoginPayload +@end + +@implementation CHIPTestClusterClusterTestPayload +@end + +@implementation CHIPTestClusterClusterTestSpecificResponsePayload +@end + +@implementation CHIPTestClusterClusterTestNotHandledPayload +@end + +@implementation CHIPTestClusterClusterTestAddArgumentsResponsePayload +@end + +@implementation CHIPTestClusterClusterTestSpecificPayload +@end + +@implementation CHIPTestClusterClusterTestSimpleArgumentResponsePayload +@end + +@implementation CHIPTestClusterClusterTestUnknownCommandPayload +@end + +@implementation CHIPTestClusterClusterTestStructArrayArgumentResponsePayload +@end + +@implementation CHIPTestClusterClusterTestAddArgumentsPayload +@end + +@implementation CHIPTestClusterClusterTestListInt8UReverseResponsePayload +@end + +@implementation CHIPTestClusterClusterTestSimpleArgumentRequestPayload +@end + +@implementation CHIPTestClusterClusterTestEnumsResponsePayload +@end + +@implementation CHIPTestClusterClusterTestStructArrayArgumentRequestPayload +@end + +@implementation CHIPTestClusterClusterTestNullableOptionalResponsePayload +@end + +@implementation CHIPTestClusterClusterTestStructArgumentRequestPayload +@end + +@implementation CHIPTestClusterClusterTestComplexNullableOptionalResponsePayload +@end + +@implementation CHIPTestClusterClusterTestNestedStructArgumentRequestPayload +@end + +@implementation CHIPTestClusterClusterBooleanResponsePayload +@end + +@implementation CHIPTestClusterClusterTestListStructArgumentRequestPayload +@end + +@implementation CHIPTestClusterClusterTestListInt8UArgumentRequestPayload +@end + +@implementation CHIPTestClusterClusterTestNestedStructListArgumentRequestPayload +@end + +@implementation CHIPTestClusterClusterTestListNestedStructListArgumentRequestPayload +@end + +@implementation CHIPTestClusterClusterTestListInt8UReverseRequestPayload +@end + +@implementation CHIPTestClusterClusterTestEnumsRequestPayload +@end + +@implementation CHIPTestClusterClusterTestNullableOptionalRequestPayload +@end + +@implementation CHIPTestClusterClusterTestComplexNullableOptionalRequestPayload +@end + +@implementation CHIPMessagingClusterDisplayMessagePayload +@end + +@implementation CHIPMessagingClusterGetLastMessagePayload +@end + +@implementation CHIPMessagingClusterCancelMessagePayload +@end + +@implementation CHIPMessagingClusterMessageConfirmationPayload +@end + +@implementation CHIPMessagingClusterDisplayProtectedMessagePayload +@end + +@implementation CHIPMessagingClusterGetMessageCancellationPayload +@end + +@implementation CHIPMessagingClusterCancelAllMessagesPayload +@end + +@implementation CHIPApplianceEventsAndAlertClusterGetAlertsPayload +@end + +@implementation CHIPApplianceEventsAndAlertClusterGetAlertsResponsePayload +@end + +@implementation CHIPApplianceEventsAndAlertClusterAlertsNotificationPayload +@end + +@implementation CHIPApplianceEventsAndAlertClusterEventsNotificationPayload +@end + +@implementation CHIPApplianceStatisticsClusterLogNotificationPayload +@end + +@implementation CHIPApplianceStatisticsClusterLogRequestPayload +@end + +@implementation CHIPApplianceStatisticsClusterLogResponsePayload +@end + +@implementation CHIPApplianceStatisticsClusterLogQueueRequestPayload +@end + +@implementation CHIPApplianceStatisticsClusterLogQueueResponsePayload +@end + +@implementation CHIPApplianceStatisticsClusterStatisticsAvailablePayload +@end + +@implementation CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandPayload +@end + +@implementation CHIPElectricalMeasurementClusterGetProfileInfoCommandPayload +@end + +@implementation CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandPayload +@end + +@implementation CHIPElectricalMeasurementClusterGetMeasurementProfileCommandPayload +@end + +@implementation CHIPBindingClusterBindPayload +@end + +@implementation CHIPBindingClusterUnbindPayload +@end + +@implementation CHIPSampleMfgSpecificClusterClusterCommandOnePayload +@end + +@implementation CHIPSampleMfgSpecificCluster2ClusterCommandTwoPayload +@end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h new file mode 100644 index 00000000000000..f18a05783b8fcc --- /dev/null +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h @@ -0,0 +1,335 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#ifndef CHIP_STRUCTS_H +#define CHIP_STRUCTS_H + +#import + +@interface CHIPScenesClusterSceneExtensionFieldSet : NSObject +@property (strong) NSNumber * _Nonnull ClusterId; +@property (strong) NSNumber * _Nonnull Length; +@property (strong) NSNumber * _Nonnull Value; +@end + +@interface CHIPPowerProfileClusterPowerProfileRecord : NSObject +@property (strong) NSNumber * _Nonnull PowerProfileId; +@property (strong) NSNumber * _Nonnull EnergyPhaseId; +@property (strong) NSNumber * _Nonnull PowerProfileRemoteControl; +@property (strong) NSNumber * _Nonnull PowerProfileState; +@end + +@interface CHIPPowerProfileClusterScheduledPhase : NSObject +@property (strong) NSNumber * _Nonnull EnergyPhaseId; +@property (strong) NSNumber * _Nonnull ScheduledTime; +@end + +@interface CHIPPowerProfileClusterTransferredPhase : NSObject +@property (strong) NSNumber * _Nonnull EnergyPhaseId; +@property (strong) NSNumber * _Nonnull MacroPhaseId; +@property (strong) NSNumber * _Nonnull ExpectedDuration; +@property (strong) NSNumber * _Nonnull PeakPower; +@property (strong) NSNumber * _Nonnull Energy; +@property (strong) NSNumber * _Nonnull MaxActivationDelay; +@end + +@interface CHIPDescriptorClusterDeviceType : NSObject +@property (strong) NSNumber * _Nonnull Type; +@property (strong) NSNumber * _Nonnull Revision; +@end + +@interface CHIPBridgedActionsClusterActionStruct : NSObject +@property (strong) NSNumber * _Nonnull ActionID; +@property (strong) NSString * _Nonnull Name; +@property (strong) NSNumber * _Nonnull Type; +@property (strong) NSNumber * _Nonnull EndpointListID; +@property (strong) NSNumber * _Nonnull SupportedCommands; +@property (strong) NSNumber * _Nonnull Status; +@end + +@interface CHIPBridgedActionsClusterEndpointListStruct : NSObject +@property (strong) NSNumber * _Nonnull EndpointListID; +@property (strong) NSString * _Nonnull Name; +@property (strong) NSNumber * _Nonnull Type; +@property (strong) NSData * _Nonnull Endpoints; +@end + +@interface CHIPGeneralCommissioningClusterBasicCommissioningInfoType : NSObject +@property (strong) NSNumber * _Nonnull FailSafeExpiryLengthMs; +@end + +@interface CHIPNetworkCommissioningClusterThreadInterfaceScanResult : NSObject +@property (strong) NSData * _Nonnull DiscoveryResponse; +@end + +@interface CHIPNetworkCommissioningClusterWiFiInterfaceScanResult : NSObject +@property (strong) NSNumber * _Nonnull Security; +@property (strong) NSData * _Nonnull Ssid; +@property (strong) NSData * _Nonnull Bssid; +@property (strong) NSNumber * _Nonnull Channel; +@property (strong) NSNumber * _Nonnull FrequencyBand; +@end + +@interface CHIPGeneralDiagnosticsClusterNetworkInterfaceType : NSObject +@property (strong) NSString * _Nonnull Name; +@property (strong) NSNumber * _Nonnull FabricConnected; +@property (strong) NSNumber * _Nonnull OffPremiseServicesReachableIPv4; +@property (strong) NSNumber * _Nonnull OffPremiseServicesReachableIPv6; +@property (strong) NSData * _Nonnull HardwareAddress; +@property (strong) NSNumber * _Nonnull Type; +@end + +@interface CHIPSoftwareDiagnosticsClusterSoftwareFault : NSObject +@property (strong) NSNumber * _Nonnull Id; +@property (strong) NSString * _Nonnull Name; +@property (strong) NSData * _Nonnull FaultRecording; +@end + +@interface CHIPSoftwareDiagnosticsClusterThreadMetrics : NSObject +@property (strong) NSNumber * _Nonnull Id; +@property (strong) NSString * _Nonnull Name; +@property (strong) NSNumber * _Nonnull StackFreeCurrent; +@property (strong) NSNumber * _Nonnull StackFreeMinimum; +@property (strong) NSNumber * _Nonnull StackSize; +@end + +@interface CHIPThreadNetworkDiagnosticsClusterNeighborTable : NSObject +@property (strong) NSNumber * _Nonnull ExtAddress; +@property (strong) NSNumber * _Nonnull Age; +@property (strong) NSNumber * _Nonnull Rloc16; +@property (strong) NSNumber * _Nonnull LinkFrameCounter; +@property (strong) NSNumber * _Nonnull MleFrameCounter; +@property (strong) NSNumber * _Nonnull Lqi; +@property (strong) NSNumber * _Nonnull AverageRssi; +@property (strong) NSNumber * _Nonnull LastRssi; +@property (strong) NSNumber * _Nonnull FrameErrorRate; +@property (strong) NSNumber * _Nonnull MessageErrorRate; +@property (strong) NSNumber * _Nonnull RxOnWhenIdle; +@property (strong) NSNumber * _Nonnull FullThreadDevice; +@property (strong) NSNumber * _Nonnull FullNetworkData; +@property (strong) NSNumber * _Nonnull IsChild; +@end + +@interface CHIPThreadNetworkDiagnosticsClusterOperationalDatasetComponents : NSObject +@property (strong) NSNumber * _Nonnull ActiveTimestampPresent; +@property (strong) NSNumber * _Nonnull PendingTimestampPresent; +@property (strong) NSNumber * _Nonnull MasterKeyPresent; +@property (strong) NSNumber * _Nonnull NetworkNamePresent; +@property (strong) NSNumber * _Nonnull ExtendedPanIdPresent; +@property (strong) NSNumber * _Nonnull MeshLocalPrefixPresent; +@property (strong) NSNumber * _Nonnull DelayPresent; +@property (strong) NSNumber * _Nonnull PanIdPresent; +@property (strong) NSNumber * _Nonnull ChannelPresent; +@property (strong) NSNumber * _Nonnull PskcPresent; +@property (strong) NSNumber * _Nonnull SecurityPolicyPresent; +@property (strong) NSNumber * _Nonnull ChannelMaskPresent; +@end + +@interface CHIPThreadNetworkDiagnosticsClusterRouteTable : NSObject +@property (strong) NSNumber * _Nonnull ExtAddress; +@property (strong) NSNumber * _Nonnull Rloc16; +@property (strong) NSNumber * _Nonnull RouterId; +@property (strong) NSNumber * _Nonnull NextHop; +@property (strong) NSNumber * _Nonnull PathCost; +@property (strong) NSNumber * _Nonnull LQIIn; +@property (strong) NSNumber * _Nonnull LQIOut; +@property (strong) NSNumber * _Nonnull Age; +@property (strong) NSNumber * _Nonnull Allocated; +@property (strong) NSNumber * _Nonnull LinkEstablished; +@end + +@interface CHIPThreadNetworkDiagnosticsClusterSecurityPolicy : NSObject +@property (strong) NSNumber * _Nonnull RotationTime; +@property (strong) NSNumber * _Nonnull Flags; +@end + +@interface CHIPOperationalCredentialsClusterFabricDescriptor : NSObject +@property (strong) NSNumber * _Nonnull FabricIndex; +@property (strong) NSData * _Nonnull RootPublicKey; +@property (strong) NSNumber * _Nonnull VendorId; +@property (strong) NSNumber * _Nonnull FabricId; +@property (strong) NSNumber * _Nonnull NodeId; +@property (strong) NSString * _Nonnull Label; +@end + +@interface CHIPOperationalCredentialsClusterNOCStruct : NSObject +@property (strong) NSNumber * _Nonnull FabricIndex; +@property (strong) NSData * _Nonnull Noc; +@end + +@interface CHIPFixedLabelClusterLabelStruct : NSObject +@property (strong) NSString * _Nonnull Label; +@property (strong) NSString * _Nonnull Value; +@end + +@interface CHIPModeSelectClusterModeOptionStruct : NSObject +@property (strong) NSString * _Nonnull Label; +@property (strong) NSNumber * _Nonnull Mode; +@property (strong) NSNumber * _Nonnull SemanticTag; +@end + +@interface CHIPModeSelectClusterSemanticTag : NSObject +@property (strong) NSNumber * _Nonnull MfgCode; +@property (strong) NSNumber * _Nonnull Value; +@end + +@interface CHIPIasAceClusterIasAceZoneStatusResult : NSObject +@property (strong) NSNumber * _Nonnull ZoneId; +@property (strong) NSNumber * _Nonnull ZoneStatus; +@end + +@interface CHIPTvChannelClusterTvChannelInfo : NSObject +@property (strong) NSNumber * _Nonnull MajorNumber; +@property (strong) NSNumber * _Nonnull MinorNumber; +@property (strong) NSString * _Nonnull Name; +@property (strong) NSString * _Nonnull CallSign; +@property (strong) NSString * _Nonnull AffiliateCallSign; +@end + +@interface CHIPTvChannelClusterTvChannelLineupInfo : NSObject +@property (strong) NSString * _Nonnull OperatorName; +@property (strong) NSString * _Nonnull LineupName; +@property (strong) NSString * _Nonnull PostalCode; +@property (strong) NSNumber * _Nonnull LineupInfoType; +@end + +@interface CHIPTargetNavigatorClusterNavigateTargetTargetInfo : NSObject +@property (strong) NSNumber * _Nonnull Identifier; +@property (strong) NSString * _Nonnull Name; +@end + +@interface CHIPMediaPlaybackClusterMediaPlaybackPosition : NSObject +@property (strong) NSNumber * _Nonnull UpdatedAt; +@property (strong) NSNumber * _Nonnull Position; +@end + +@interface CHIPMediaInputClusterMediaInputInfo : NSObject +@property (strong) NSNumber * _Nonnull Index; +@property (strong) NSNumber * _Nonnull InputType; +@property (strong) NSString * _Nonnull Name; +@property (strong) NSString * _Nonnull Description; +@end + +@interface CHIPContentLauncherClusterContentLaunchAdditionalInfo : NSObject +@property (strong) NSString * _Nonnull Name; +@property (strong) NSString * _Nonnull Value; +@end + +@interface CHIPContentLauncherClusterContentLaunchParamater : NSObject +@property (strong) NSNumber * _Nonnull Type; +@property (strong) NSString * _Nonnull Value; +@property (strong) NSArray * _Nonnull ExternalIDList; +@end + +@interface CHIPContentLauncherClusterContentLaunchBrandingInformation : NSObject +@property (strong) NSString * _Nonnull ProviderName; +@property (strong) NSNumber * _Nonnull Background; +@property (strong) NSNumber * _Nonnull Logo; +@property (strong) NSNumber * _Nonnull ProgressBar; +@property (strong) NSNumber * _Nonnull Splash; +@property (strong) NSNumber * _Nonnull WaterMark; +@end + +@interface CHIPContentLauncherClusterContentLaunchDimension : NSObject +@property (strong) NSString * _Nonnull Width; +@property (strong) NSString * _Nonnull Height; +@property (strong) NSNumber * _Nonnull Metric; +@end + +@interface CHIPContentLauncherClusterContentLaunchStyleInformation : NSObject +@property (strong) NSString * _Nonnull ImageUrl; +@property (strong) NSString * _Nonnull Color; +@property (strong) NSNumber * _Nonnull Size; +@end + +@interface CHIPAudioOutputClusterAudioOutputInfo : NSObject +@property (strong) NSNumber * _Nonnull Index; +@property (strong) NSNumber * _Nonnull OutputType; +@property (strong) NSString * _Nonnull Name; +@end + +@interface CHIPApplicationLauncherClusterApplicationLauncherApp : NSObject +@property (strong) NSNumber * _Nonnull CatalogVendorId; +@property (strong) NSString * _Nonnull ApplicationId; +@end + +@interface CHIPTestClusterClusterSimpleStruct : NSObject +@property (strong) NSNumber * _Nonnull A; +@property (strong) NSNumber * _Nonnull B; +@property (strong) NSNumber * _Nonnull C; +@property (strong) NSData * _Nonnull D; +@property (strong) NSString * _Nonnull E; +@property (strong) NSNumber * _Nonnull F; +@end + +@interface CHIPTestClusterClusterNullablesAndOptionalsStruct : NSObject +@property (strong) NSNumber * _Nullable NullableInt; +@property (strong) NSNumber * _Nullable OptionalInt; +@property (strong) NSNumber * _Nullable NullableOptionalInt; +@property (strong) NSString * _Nullable NullableString; +@property (strong) NSString * _Nullable OptionalString; +@property (strong) NSString * _Nullable NullableOptionalString; +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nullable NullableStruct; +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nullable OptionalStruct; +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nullable NullableOptionalStruct; +@property (strong) NSArray * _Nullable NullableList; +@property (strong) NSArray * _Nullable OptionalList; +@property (strong) NSArray * _Nullable NullableOptionalList; +@end + +@interface CHIPTestClusterClusterNestedStruct : NSObject +@property (strong) NSNumber * _Nonnull A; +@property (strong) NSNumber * _Nonnull B; +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nonnull C; +@end + +@interface CHIPTestClusterClusterNestedStructList : NSObject +@property (strong) NSNumber * _Nonnull A; +@property (strong) NSNumber * _Nonnull B; +@property (strong) CHIPTestClusterClusterSimpleStruct * _Nonnull C; +@property (strong) NSArray * _Nonnull D; +@property (strong) NSArray * _Nonnull E; +@property (strong) NSArray * _Nonnull F; +@property (strong) NSArray * _Nonnull G; +@end + +@interface CHIPTestClusterClusterDoubleNestedStructList : NSObject +@property (strong) NSArray * _Nonnull A; +@end + +@interface CHIPTestClusterClusterTestListStructOctet : NSObject +@property (strong) NSNumber * _Nonnull FabricIndex; +@property (strong) NSData * _Nonnull OperationalCert; +@end + +@interface CHIPGroupKeyManagementClusterGroupKey : NSObject +@property (strong) NSNumber * _Nonnull VendorId; +@property (strong) NSNumber * _Nonnull GroupKeyIndex; +@property (strong) NSData * _Nonnull GroupKeyRoot; +@property (strong) NSNumber * _Nonnull GroupKeyEpochStartTime; +@property (strong) NSNumber * _Nonnull GroupKeySecurityPolicy; +@end + +@interface CHIPGroupKeyManagementClusterGroupState : NSObject +@property (strong) NSNumber * _Nonnull VendorId; +@property (strong) NSNumber * _Nonnull VendorGroupId; +@property (strong) NSNumber * _Nonnull GroupKeySetIndex; +@end + +#endif /* CHIP_STRUCTS_H */ diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm new file mode 100644 index 00000000000000..a6f24f0ff5cf99 --- /dev/null +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm @@ -0,0 +1,149 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#import "CHIPStructsObjc.h" + +@implementation CHIPScenesClusterSceneExtensionFieldSet +@end + +@implementation CHIPPowerProfileClusterPowerProfileRecord +@end + +@implementation CHIPPowerProfileClusterScheduledPhase +@end + +@implementation CHIPPowerProfileClusterTransferredPhase +@end + +@implementation CHIPDescriptorClusterDeviceType +@end + +@implementation CHIPBridgedActionsClusterActionStruct +@end + +@implementation CHIPBridgedActionsClusterEndpointListStruct +@end + +@implementation CHIPGeneralCommissioningClusterBasicCommissioningInfoType +@end + +@implementation CHIPNetworkCommissioningClusterThreadInterfaceScanResult +@end + +@implementation CHIPNetworkCommissioningClusterWiFiInterfaceScanResult +@end + +@implementation CHIPGeneralDiagnosticsClusterNetworkInterfaceType +@end + +@implementation CHIPSoftwareDiagnosticsClusterSoftwareFault +@end + +@implementation CHIPSoftwareDiagnosticsClusterThreadMetrics +@end + +@implementation CHIPThreadNetworkDiagnosticsClusterNeighborTable +@end + +@implementation CHIPThreadNetworkDiagnosticsClusterOperationalDatasetComponents +@end + +@implementation CHIPThreadNetworkDiagnosticsClusterRouteTable +@end + +@implementation CHIPThreadNetworkDiagnosticsClusterSecurityPolicy +@end + +@implementation CHIPOperationalCredentialsClusterFabricDescriptor +@end + +@implementation CHIPOperationalCredentialsClusterNOCStruct +@end + +@implementation CHIPFixedLabelClusterLabelStruct +@end + +@implementation CHIPModeSelectClusterModeOptionStruct +@end + +@implementation CHIPModeSelectClusterSemanticTag +@end + +@implementation CHIPIasAceClusterIasAceZoneStatusResult +@end + +@implementation CHIPTvChannelClusterTvChannelInfo +@end + +@implementation CHIPTvChannelClusterTvChannelLineupInfo +@end + +@implementation CHIPTargetNavigatorClusterNavigateTargetTargetInfo +@end + +@implementation CHIPMediaPlaybackClusterMediaPlaybackPosition +@end + +@implementation CHIPMediaInputClusterMediaInputInfo +@end + +@implementation CHIPContentLauncherClusterContentLaunchAdditionalInfo +@end + +@implementation CHIPContentLauncherClusterContentLaunchParamater +@end + +@implementation CHIPContentLauncherClusterContentLaunchBrandingInformation +@end + +@implementation CHIPContentLauncherClusterContentLaunchDimension +@end + +@implementation CHIPContentLauncherClusterContentLaunchStyleInformation +@end + +@implementation CHIPAudioOutputClusterAudioOutputInfo +@end + +@implementation CHIPApplicationLauncherClusterApplicationLauncherApp +@end + +@implementation CHIPTestClusterClusterSimpleStruct +@end + +@implementation CHIPTestClusterClusterNullablesAndOptionalsStruct +@end + +@implementation CHIPTestClusterClusterNestedStruct +@end + +@implementation CHIPTestClusterClusterNestedStructList +@end + +@implementation CHIPTestClusterClusterDoubleNestedStructList +@end + +@implementation CHIPTestClusterClusterTestListStructOctet +@end + +@implementation CHIPGroupKeyManagementClusterGroupKey +@end + +@implementation CHIPGroupKeyManagementClusterGroupState +@end diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index de0b783da7e38b..83e9616d90b519 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -157,11 +157,12 @@ - (void)testReuseChipClusterObject CHIPTestCluster * cluster = [[CHIPTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster test:^(NSError * err, NSDictionary * values) { - NSLog(@"ReuseCHIPClusterObject test Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster test:[[CHIPTestClusterClusterTestPayload alloc] init] + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ReuseCHIPClusterObject test Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; @@ -169,11 +170,12 @@ - (void)testReuseChipClusterObject // Reuse the CHIPCluster Object for multiple times. - [cluster test:^(NSError * err, NSDictionary * values) { - NSLog(@"ReuseCHIPClusterObject test Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster test:[[CHIPTestClusterClusterTestPayload alloc] init] + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ReuseCHIPClusterObject test Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -192,7 +194,10 @@ - (void)testSendClusterTest_TC_BI_1_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 1U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } [expectation fulfill]; }]; @@ -235,7 +240,10 @@ - (void)testSendClusterTest_TC_BI_1_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 1U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } [expectation fulfill]; }]; @@ -257,7 +265,10 @@ - (void)testSendClusterTest_TC_BI_2_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -322,7 +333,10 @@ - (void)testSendClusterTest_TC_BI_2_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -387,7 +401,10 @@ - (void)testSendClusterTest_TC_BI_2_1_000006_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -408,7 +425,10 @@ - (void)testSendClusterTest_TC_BI_2_1_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -474,7 +494,10 @@ - (void)testSendClusterTest_TC_BI_2_1_000010_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -496,7 +519,10 @@ - (void)testSendClusterTest_TC_BI_2_2_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -517,7 +543,10 @@ - (void)testSendClusterTest_TC_BI_2_2_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -538,7 +567,10 @@ - (void)testSendClusterTest_TC_BI_2_2_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -559,7 +591,10 @@ - (void)testSendClusterTest_TC_BI_2_2_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -580,7 +615,10 @@ - (void)testSendClusterTest_TC_BI_2_2_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -601,7 +639,10 @@ - (void)testSendClusterTest_TC_BI_2_2_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -622,7 +663,10 @@ - (void)testSendClusterTest_TC_BI_2_2_000006_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -643,7 +687,10 @@ - (void)testSendClusterTest_TC_BI_2_2_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -665,7 +712,10 @@ - (void)testSendClusterTest_TC_BOOL_1_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 1U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } [expectation fulfill]; }]; @@ -708,7 +758,10 @@ - (void)testSendClusterTest_TC_BOOL_1_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 1U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } [expectation fulfill]; }]; @@ -730,7 +783,10 @@ - (void)testSendClusterTest_TC_BOOL_2_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -793,7 +849,10 @@ - (void)testSendClusterTest_TC_BOOL_2_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -838,7 +897,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -901,7 +963,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -922,7 +987,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -986,7 +1054,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -1007,7 +1078,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000008_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 24939U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 24939U); + } [expectation fulfill]; }]; @@ -1069,7 +1143,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000011_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 24939U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 24939U); + } [expectation fulfill]; }]; @@ -1090,7 +1167,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000012_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 24701U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 24701U); + } [expectation fulfill]; }]; @@ -1153,7 +1233,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000015_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 24701U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 24701U); + } [expectation fulfill]; }]; @@ -1217,7 +1300,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000018_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -1278,7 +1364,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000021_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -1299,7 +1388,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000022_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -1361,7 +1453,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000025_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -1401,7 +1496,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000027_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -1462,7 +1560,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000030_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -1483,7 +1584,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000031_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -1545,7 +1649,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000034_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -1566,7 +1673,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000035_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 25U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 25U); + } [expectation fulfill]; }]; @@ -1627,7 +1737,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000038_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 25U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 25U); + } [expectation fulfill]; }]; @@ -1648,7 +1761,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000039_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 8960U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 8960U); + } [expectation fulfill]; }]; @@ -1713,7 +1829,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000042_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 8960U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 8960U); + } [expectation fulfill]; }]; @@ -1734,7 +1853,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000043_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -1799,7 +1921,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000046_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -1820,7 +1945,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000047_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -1884,7 +2012,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000050_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -1905,7 +2036,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000051_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -1972,7 +2106,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000054_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -1993,7 +2130,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000055_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 65279U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 65279U); + } [expectation fulfill]; }]; @@ -2060,7 +2200,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000058_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 65279U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 65279U); + } [expectation fulfill]; }]; @@ -2125,7 +2268,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000061_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -2193,7 +2339,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000064_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -2214,7 +2363,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000065_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -2277,7 +2429,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000068_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -2341,7 +2496,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000071_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -2424,7 +2582,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000075_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -2486,7 +2647,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000078_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -2548,7 +2712,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000081_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -2629,7 +2796,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000085_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -2691,7 +2861,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000088_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -2772,7 +2945,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000092_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -2834,7 +3010,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000095_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -2915,7 +3094,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000099_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -2977,7 +3159,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000102_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3058,7 +3243,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000106_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3120,7 +3308,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000109_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3201,7 +3392,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000113_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3263,7 +3457,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000116_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3345,7 +3542,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000120_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3408,7 +3608,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000123_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3471,7 +3674,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000126_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3534,7 +3740,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000129_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3616,7 +3825,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000133_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3679,7 +3891,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000136_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3761,7 +3976,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000140_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3824,7 +4042,10 @@ - (void)testSendClusterTest_TC_CC_2_1_000143_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -3860,13 +4081,15 @@ - (void)testSendClusterTest_TC_CC_3_1_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -3884,7 +4107,10 @@ - (void)testSendClusterTest_TC_CC_3_1_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -3900,16 +4126,13 @@ - (void)testSendClusterTest_TC_CC_3_1_000002_MoveToHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t hueArgument = 150; - uint8_t directionArgument = 0; - uint16_t transitionTimeArgument = 100U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToHue:hueArgument - direction:directionArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveToHuePayload alloc] init]; + payload.Hue = [NSNumber numberWithUnsignedChar:150]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:100]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveToHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move to hue shortest distance command Error: %@", err); @@ -3929,16 +4152,13 @@ - (void)testSendClusterTest_TC_CC_3_1_000003_MoveToHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t hueArgument = 200; - uint8_t directionArgument = 1; - uint16_t transitionTimeArgument = 100U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToHue:hueArgument - direction:directionArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveToHuePayload alloc] init]; + payload.Hue = [NSNumber numberWithUnsignedChar:200]; + payload.Direction = [NSNumber numberWithUnsignedChar:1]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:100]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveToHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move to hue longest distance command Error: %@", err); @@ -3958,16 +4178,13 @@ - (void)testSendClusterTest_TC_CC_3_1_000004_MoveToHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t hueArgument = 250; - uint8_t directionArgument = 2; - uint16_t transitionTimeArgument = 100U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToHue:hueArgument - direction:directionArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveToHuePayload alloc] init]; + payload.Hue = [NSNumber numberWithUnsignedChar:250]; + payload.Direction = [NSNumber numberWithUnsignedChar:2]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:100]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveToHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move to hue up command Error: %@", err); @@ -3987,16 +4204,13 @@ - (void)testSendClusterTest_TC_CC_3_1_000005_MoveToHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t hueArgument = 225; - uint8_t directionArgument = 3; - uint16_t transitionTimeArgument = 100U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToHue:hueArgument - direction:directionArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveToHuePayload alloc] init]; + payload.Hue = [NSNumber numberWithUnsignedChar:225]; + payload.Direction = [NSNumber numberWithUnsignedChar:3]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:100]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveToHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move to hue down command Error: %@", err); @@ -4016,13 +4230,15 @@ - (void)testSendClusterTest_TC_CC_3_1_000006_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4040,7 +4256,10 @@ - (void)testSendClusterTest_TC_CC_3_1_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -4057,13 +4276,15 @@ - (void)testSendClusterTest_TC_CC_3_2_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4081,7 +4302,10 @@ - (void)testSendClusterTest_TC_CC_3_2_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -4097,14 +4321,12 @@ - (void)testSendClusterTest_TC_CC_3_2_000002_MoveHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 1; - uint8_t rateArgument = 50; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveHuePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:1]; + payload.Rate = [NSNumber numberWithUnsignedChar:50]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move hue up command Error: %@", err); @@ -4124,14 +4346,12 @@ - (void)testSendClusterTest_TC_CC_3_2_000003_MoveHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 0; - uint8_t rateArgument = 50; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveHuePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:0]; + payload.Rate = [NSNumber numberWithUnsignedChar:50]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move hue stop command Error: %@", err); @@ -4151,14 +4371,12 @@ - (void)testSendClusterTest_TC_CC_3_2_000004_MoveHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 3; - uint8_t rateArgument = 50; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveHuePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:3]; + payload.Rate = [NSNumber numberWithUnsignedChar:50]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move hue down command Error: %@", err); @@ -4178,14 +4396,12 @@ - (void)testSendClusterTest_TC_CC_3_2_000005_MoveHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 0; - uint8_t rateArgument = 50; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveHuePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:0]; + payload.Rate = [NSNumber numberWithUnsignedChar:50]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move hue stop command Error: %@", err); @@ -4205,13 +4421,15 @@ - (void)testSendClusterTest_TC_CC_3_2_000006_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4229,7 +4447,10 @@ - (void)testSendClusterTest_TC_CC_3_2_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -4246,13 +4467,15 @@ - (void)testSendClusterTest_TC_CC_3_3_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4270,7 +4493,10 @@ - (void)testSendClusterTest_TC_CC_3_3_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -4286,16 +4512,13 @@ - (void)testSendClusterTest_TC_CC_3_3_000002_StepHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 1; - uint8_t stepSizeArgument = 5; - uint8_t transitionTimeArgument = 25; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster stepHue:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterStepHuePayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:1]; + payload.StepSize = [NSNumber numberWithUnsignedChar:5]; + payload.TransitionTime = [NSNumber numberWithUnsignedChar:25]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster stepHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Step hue up command Error: %@", err); @@ -4315,16 +4538,13 @@ - (void)testSendClusterTest_TC_CC_3_3_000003_StepHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 3; - uint8_t stepSizeArgument = 5; - uint8_t transitionTimeArgument = 25; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster stepHue:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterStepHuePayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:3]; + payload.StepSize = [NSNumber numberWithUnsignedChar:5]; + payload.TransitionTime = [NSNumber numberWithUnsignedChar:25]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster stepHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Step hue down command Error: %@", err); @@ -4344,13 +4564,15 @@ - (void)testSendClusterTest_TC_CC_3_3_000004_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4368,7 +4590,10 @@ - (void)testSendClusterTest_TC_CC_3_3_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -4385,13 +4610,15 @@ - (void)testSendClusterTest_TC_CC_4_1_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4409,7 +4636,10 @@ - (void)testSendClusterTest_TC_CC_4_1_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -4425,14 +4655,12 @@ - (void)testSendClusterTest_TC_CC_4_1_000002_MoveToSaturation CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t saturationArgument = 90; - uint16_t transitionTimeArgument = 10U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToSaturation:saturationArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveToSaturationPayload alloc] init]; + payload.Saturation = [NSNumber numberWithUnsignedChar:90]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:10]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveToSaturation:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move to saturation command Error: %@", err); @@ -4452,13 +4680,15 @@ - (void)testSendClusterTest_TC_CC_4_1_000003_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4476,7 +4706,10 @@ - (void)testSendClusterTest_TC_CC_4_1_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -4493,13 +4726,15 @@ - (void)testSendClusterTest_TC_CC_4_2_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4517,7 +4752,10 @@ - (void)testSendClusterTest_TC_CC_4_2_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -4533,14 +4771,12 @@ - (void)testSendClusterTest_TC_CC_4_2_000002_MoveSaturation CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 1; - uint8_t rateArgument = 5; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveSaturation:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveSaturationPayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:1]; + payload.Rate = [NSNumber numberWithUnsignedChar:5]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveSaturation:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move saturation up command Error: %@", err); @@ -4560,14 +4796,12 @@ - (void)testSendClusterTest_TC_CC_4_2_000003_MoveSaturation CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 3; - uint8_t rateArgument = 5; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveSaturation:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveSaturationPayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:3]; + payload.Rate = [NSNumber numberWithUnsignedChar:5]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveSaturation:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move saturation down command Error: %@", err); @@ -4587,13 +4821,15 @@ - (void)testSendClusterTest_TC_CC_4_2_000004_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4611,7 +4847,10 @@ - (void)testSendClusterTest_TC_CC_4_2_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -4628,13 +4867,15 @@ - (void)testSendClusterTest_TC_CC_4_3_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4652,7 +4893,10 @@ - (void)testSendClusterTest_TC_CC_4_3_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -4668,16 +4912,13 @@ - (void)testSendClusterTest_TC_CC_4_3_000002_StepSaturation CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 1; - uint8_t stepSizeArgument = 15; - uint8_t transitionTimeArgument = 10; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster stepSaturation:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterStepSaturationPayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:1]; + payload.StepSize = [NSNumber numberWithUnsignedChar:15]; + payload.TransitionTime = [NSNumber numberWithUnsignedChar:10]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster stepSaturation:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Step saturation up command Error: %@", err); @@ -4697,16 +4938,13 @@ - (void)testSendClusterTest_TC_CC_4_3_000003_StepSaturation CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 3; - uint8_t stepSizeArgument = 20; - uint8_t transitionTimeArgument = 10; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster stepSaturation:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterStepSaturationPayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:3]; + payload.StepSize = [NSNumber numberWithUnsignedChar:20]; + payload.TransitionTime = [NSNumber numberWithUnsignedChar:10]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster stepSaturation:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Step saturation down command Error: %@", err); @@ -4726,13 +4964,15 @@ - (void)testSendClusterTest_TC_CC_4_3_000004_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4750,7 +4990,10 @@ - (void)testSendClusterTest_TC_CC_4_3_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -4767,13 +5010,15 @@ - (void)testSendClusterTest_TC_CC_4_4_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4791,7 +5036,10 @@ - (void)testSendClusterTest_TC_CC_4_4_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -4807,16 +5055,13 @@ - (void)testSendClusterTest_TC_CC_4_4_000002_MoveToHueAndSaturation CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t hueArgument = 40; - uint8_t saturationArgument = 160; - uint16_t transitionTimeArgument = 10U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToHueAndSaturation:hueArgument - saturation:saturationArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveToHueAndSaturationPayload alloc] init]; + payload.Hue = [NSNumber numberWithUnsignedChar:40]; + payload.Saturation = [NSNumber numberWithUnsignedChar:160]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:10]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveToHueAndSaturation:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move To current hue and saturation command Error: %@", err); @@ -4836,13 +5081,15 @@ - (void)testSendClusterTest_TC_CC_4_4_000003_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4860,7 +5107,10 @@ - (void)testSendClusterTest_TC_CC_4_4_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -4877,13 +5127,15 @@ - (void)testSendClusterTest_TC_CC_5_1_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4901,7 +5153,10 @@ - (void)testSendClusterTest_TC_CC_5_1_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -4917,16 +5172,13 @@ - (void)testSendClusterTest_TC_CC_5_1_000002_MoveToColor CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t colorXArgument = 200U; - uint16_t colorYArgument = 300U; - uint16_t transitionTimeArgument = 20U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToColor:colorXArgument - colorY:colorYArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveToColorPayload alloc] init]; + payload.ColorX = [NSNumber numberWithUnsignedShort:200]; + payload.ColorY = [NSNumber numberWithUnsignedShort:300]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:20]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveToColor:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move to Color command Error: %@", err); @@ -4946,13 +5198,15 @@ - (void)testSendClusterTest_TC_CC_5_1_000003_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -4970,7 +5224,10 @@ - (void)testSendClusterTest_TC_CC_5_1_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -4987,13 +5244,15 @@ - (void)testSendClusterTest_TC_CC_5_2_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5011,7 +5270,10 @@ - (void)testSendClusterTest_TC_CC_5_2_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -5027,14 +5289,12 @@ - (void)testSendClusterTest_TC_CC_5_2_000002_MoveColor CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - int16_t rateXArgument = 15; - int16_t rateYArgument = 20; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveColor:rateXArgument - rateY:rateYArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveColorPayload alloc] init]; + payload.RateX = [NSNumber numberWithShort:15]; + payload.RateY = [NSNumber numberWithShort:20]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveColor:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move Color command Error: %@", err); @@ -5054,10 +5314,10 @@ - (void)testSendClusterTest_TC_CC_5_2_000003_StopMoveStep CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster stopMoveStep:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterStopMoveStepPayload alloc] init]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster stopMoveStep:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Stop Move Step command Error: %@", err); @@ -5077,13 +5337,15 @@ - (void)testSendClusterTest_TC_CC_5_2_000004_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5101,7 +5363,10 @@ - (void)testSendClusterTest_TC_CC_5_2_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -5118,13 +5383,15 @@ - (void)testSendClusterTest_TC_CC_5_3_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5142,7 +5409,10 @@ - (void)testSendClusterTest_TC_CC_5_3_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -5158,16 +5428,13 @@ - (void)testSendClusterTest_TC_CC_5_3_000002_StepColor CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - int16_t stepXArgument = 15; - int16_t stepYArgument = 20; - uint16_t transitionTimeArgument = 50U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster stepColor:stepXArgument - stepY:stepYArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterStepColorPayload alloc] init]; + payload.StepX = [NSNumber numberWithShort:15]; + payload.StepY = [NSNumber numberWithShort:20]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:50]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster stepColor:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Step Color command Error: %@", err); @@ -5187,13 +5454,15 @@ - (void)testSendClusterTest_TC_CC_5_3_000003_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5211,7 +5480,10 @@ - (void)testSendClusterTest_TC_CC_5_3_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -5228,13 +5500,15 @@ - (void)testSendClusterTest_TC_CC_6_1_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5252,7 +5526,10 @@ - (void)testSendClusterTest_TC_CC_6_1_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -5268,14 +5545,12 @@ - (void)testSendClusterTest_TC_CC_6_1_000002_MoveToColorTemperature CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t colorTemperatureArgument = 100U; - uint16_t transitionTimeArgument = 10U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToColorTemperature:colorTemperatureArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveToColorTemperaturePayload alloc] init]; + payload.ColorTemperature = [NSNumber numberWithUnsignedShort:100]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:10]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveToColorTemperature:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move To Color Temperature command Error: %@", err); @@ -5295,13 +5570,15 @@ - (void)testSendClusterTest_TC_CC_6_1_000003_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5319,7 +5596,10 @@ - (void)testSendClusterTest_TC_CC_6_1_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -5336,13 +5616,15 @@ - (void)testSendClusterTest_TC_CC_6_2_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5360,7 +5642,10 @@ - (void)testSendClusterTest_TC_CC_6_2_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -5376,18 +5661,14 @@ - (void)testSendClusterTest_TC_CC_6_2_000002_MoveColorTemperature CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 1; - uint16_t rateArgument = 10U; - uint16_t colorTemperatureMinimumArgument = 1U; - uint16_t colorTemperatureMaximumArgument = 255U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveColorTemperature:moveModeArgument - rate:rateArgument - colorTemperatureMinimum:colorTemperatureMinimumArgument - colorTemperatureMaximum:colorTemperatureMaximumArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveColorTemperaturePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:1]; + payload.Rate = [NSNumber numberWithUnsignedShort:10]; + payload.ColorTemperatureMinimum = [NSNumber numberWithUnsignedShort:1]; + payload.ColorTemperatureMaximum = [NSNumber numberWithUnsignedShort:255]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveColorTemperature:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move up color temperature command Error: %@", err); @@ -5407,18 +5688,14 @@ - (void)testSendClusterTest_TC_CC_6_2_000003_MoveColorTemperature CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 0; - uint16_t rateArgument = 10U; - uint16_t colorTemperatureMinimumArgument = 1U; - uint16_t colorTemperatureMaximumArgument = 255U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveColorTemperature:moveModeArgument - rate:rateArgument - colorTemperatureMinimum:colorTemperatureMinimumArgument - colorTemperatureMaximum:colorTemperatureMaximumArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveColorTemperaturePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:0]; + payload.Rate = [NSNumber numberWithUnsignedShort:10]; + payload.ColorTemperatureMinimum = [NSNumber numberWithUnsignedShort:1]; + payload.ColorTemperatureMaximum = [NSNumber numberWithUnsignedShort:255]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveColorTemperature:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Stop Color Temperature command Error: %@", err); @@ -5438,18 +5715,14 @@ - (void)testSendClusterTest_TC_CC_6_2_000004_MoveColorTemperature CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 3; - uint16_t rateArgument = 20U; - uint16_t colorTemperatureMinimumArgument = 1U; - uint16_t colorTemperatureMaximumArgument = 255U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveColorTemperature:moveModeArgument - rate:rateArgument - colorTemperatureMinimum:colorTemperatureMinimumArgument - colorTemperatureMaximum:colorTemperatureMaximumArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterMoveColorTemperaturePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:3]; + payload.Rate = [NSNumber numberWithUnsignedShort:20]; + payload.ColorTemperatureMinimum = [NSNumber numberWithUnsignedShort:1]; + payload.ColorTemperatureMaximum = [NSNumber numberWithUnsignedShort:255]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster moveColorTemperature:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Move down color temperature command Error: %@", err); @@ -5469,13 +5742,15 @@ - (void)testSendClusterTest_TC_CC_6_2_000005_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5493,7 +5768,10 @@ - (void)testSendClusterTest_TC_CC_6_2_000006_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -5510,13 +5788,15 @@ - (void)testSendClusterTest_TC_CC_6_3_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5534,7 +5814,10 @@ - (void)testSendClusterTest_TC_CC_6_3_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -5550,20 +5833,15 @@ - (void)testSendClusterTest_TC_CC_6_3_000002_StepColorTemperature CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 1; - uint16_t stepSizeArgument = 5U; - uint16_t transitionTimeArgument = 50U; - uint16_t colorTemperatureMinimumArgument = 5U; - uint16_t colorTemperatureMaximumArgument = 100U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster stepColorTemperature:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - colorTemperatureMinimum:colorTemperatureMinimumArgument - colorTemperatureMaximum:colorTemperatureMaximumArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterStepColorTemperaturePayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:1]; + payload.StepSize = [NSNumber numberWithUnsignedShort:5]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:50]; + payload.ColorTemperatureMinimum = [NSNumber numberWithUnsignedShort:5]; + payload.ColorTemperatureMaximum = [NSNumber numberWithUnsignedShort:100]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster stepColorTemperature:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Step up color temperature command Error: %@", err); @@ -5583,20 +5861,15 @@ - (void)testSendClusterTest_TC_CC_6_3_000003_StepColorTemperature CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 3; - uint16_t stepSizeArgument = 5U; - uint16_t transitionTimeArgument = 50U; - uint16_t colorTemperatureMinimumArgument = 5U; - uint16_t colorTemperatureMaximumArgument = 100U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster stepColorTemperature:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - colorTemperatureMinimum:colorTemperatureMinimumArgument - colorTemperatureMaximum:colorTemperatureMaximumArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterStepColorTemperaturePayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:3]; + payload.StepSize = [NSNumber numberWithUnsignedShort:5]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:50]; + payload.ColorTemperatureMinimum = [NSNumber numberWithUnsignedShort:5]; + payload.ColorTemperatureMaximum = [NSNumber numberWithUnsignedShort:100]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster stepColorTemperature:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Step down color temperature command Error: %@", err); @@ -5616,13 +5889,15 @@ - (void)testSendClusterTest_TC_CC_6_3_000004_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5640,7 +5915,10 @@ - (void)testSendClusterTest_TC_CC_6_3_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -5657,13 +5935,15 @@ - (void)testSendClusterTest_TC_CC_7_1_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5681,7 +5961,10 @@ - (void)testSendClusterTest_TC_CC_7_1_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -5697,16 +5980,13 @@ - (void)testSendClusterTest_TC_CC_7_1_000002_EnhancedMoveToHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t enhancedHueArgument = 1025U; - uint8_t directionArgument = 0; - uint16_t transitionTimeArgument = 1U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveToHue:enhancedHueArgument - direction:directionArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterEnhancedMoveToHuePayload alloc] init]; + payload.EnhancedHue = [NSNumber numberWithUnsignedShort:1025]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:1]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster enhancedMoveToHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Enhanced Move To Hue command Error: %@", err); @@ -5732,7 +6012,10 @@ - (void)testSendClusterTest_TC_CC_7_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 1U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } [expectation fulfill]; }]; @@ -5748,13 +6031,15 @@ - (void)testSendClusterTest_TC_CC_7_1_000004_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5772,7 +6057,10 @@ - (void)testSendClusterTest_TC_CC_7_1_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -5789,13 +6077,15 @@ - (void)testSendClusterTest_TC_CC_7_2_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5813,7 +6103,10 @@ - (void)testSendClusterTest_TC_CC_7_2_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -5829,14 +6122,12 @@ - (void)testSendClusterTest_TC_CC_7_2_000002_EnhancedMoveHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 3; - uint16_t rateArgument = 5U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterEnhancedMoveHuePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:3]; + payload.Rate = [NSNumber numberWithUnsignedShort:5]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster enhancedMoveHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Enhanced Move Hue Down command Error: %@", err); @@ -5856,14 +6147,12 @@ - (void)testSendClusterTest_TC_CC_7_2_000003_EnhancedMoveHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 0; - uint16_t rateArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterEnhancedMoveHuePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:0]; + payload.Rate = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster enhancedMoveHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Enhanced Move Hue Stop command Error: %@", err); @@ -5883,14 +6172,12 @@ - (void)testSendClusterTest_TC_CC_7_2_000004_EnhancedMoveHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 1; - uint16_t rateArgument = 50U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterEnhancedMoveHuePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:1]; + payload.Rate = [NSNumber numberWithUnsignedShort:50]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster enhancedMoveHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Enhanced Move Hue Up command Error: %@", err); @@ -5910,14 +6197,12 @@ - (void)testSendClusterTest_TC_CC_7_2_000005_EnhancedMoveHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 0; - uint16_t rateArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterEnhancedMoveHuePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:0]; + payload.Rate = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster enhancedMoveHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Enhanced Move Hue Stop command Error: %@", err); @@ -5937,13 +6222,15 @@ - (void)testSendClusterTest_TC_CC_7_2_000006_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -5961,7 +6248,10 @@ - (void)testSendClusterTest_TC_CC_7_2_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -5978,13 +6268,15 @@ - (void)testSendClusterTest_TC_CC_7_3_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -6002,7 +6294,10 @@ - (void)testSendClusterTest_TC_CC_7_3_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -6018,16 +6313,13 @@ - (void)testSendClusterTest_TC_CC_7_3_000002_EnhancedStepHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 0; - uint16_t stepSizeArgument = 50U; - uint16_t transitionTimeArgument = 1U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster enhancedStepHue:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterEnhancedStepHuePayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:0]; + payload.StepSize = [NSNumber numberWithUnsignedShort:50]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:1]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster enhancedStepHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Enhanced Step Hue Up command Error: %@", err); @@ -6047,16 +6339,13 @@ - (void)testSendClusterTest_TC_CC_7_3_000003_EnhancedStepHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 1; - uint16_t stepSizeArgument = 75U; - uint16_t transitionTimeArgument = 1U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster enhancedStepHue:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterEnhancedStepHuePayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:1]; + payload.StepSize = [NSNumber numberWithUnsignedShort:75]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:1]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster enhancedStepHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Enhanced Step Hue Down command Error: %@", err); @@ -6076,13 +6365,15 @@ - (void)testSendClusterTest_TC_CC_7_3_000004_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -6100,7 +6391,10 @@ - (void)testSendClusterTest_TC_CC_7_3_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -6117,13 +6411,15 @@ - (void)testSendClusterTest_TC_CC_7_4_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -6141,7 +6437,10 @@ - (void)testSendClusterTest_TC_CC_7_4_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -6157,16 +6456,13 @@ - (void)testSendClusterTest_TC_CC_7_4_000002_EnhancedMoveToHueAndSaturation CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t enhancedHueArgument = 1200U; - uint8_t saturationArgument = 90; - uint16_t transitionTimeArgument = 10U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveToHueAndSaturation:enhancedHueArgument - saturation:saturationArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterEnhancedMoveToHueAndSaturationPayload alloc] init]; + payload.EnhancedHue = [NSNumber numberWithUnsignedShort:1200]; + payload.Saturation = [NSNumber numberWithUnsignedChar:90]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:10]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster enhancedMoveToHueAndSaturation:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Enhanced move to hue and saturation command Error: %@", err); @@ -6186,13 +6482,15 @@ - (void)testSendClusterTest_TC_CC_7_4_000003_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -6210,7 +6508,10 @@ - (void)testSendClusterTest_TC_CC_7_4_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -6227,13 +6528,15 @@ - (void)testSendClusterTest_TC_CC_8_1_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -6251,7 +6554,10 @@ - (void)testSendClusterTest_TC_CC_8_1_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -6267,20 +6573,15 @@ - (void)testSendClusterTest_TC_CC_8_1_000002_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 14; - uint8_t actionArgument = 0; - uint8_t directionArgument = 1; - uint16_t timeArgument = 100U; - uint16_t startHueArgument = 500U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:14]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:1]; + payload.Time = [NSNumber numberWithUnsignedShort:100]; + payload.StartHue = [NSNumber numberWithUnsignedShort:500]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Color Loop Set Command - Set all Attributs Error: %@", err); @@ -6305,7 +6606,10 @@ - (void)testSendClusterTest_TC_CC_8_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -6326,7 +6630,10 @@ - (void)testSendClusterTest_TC_CC_8_1_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 100U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 100U); + } [expectation fulfill]; }]; @@ -6347,7 +6654,10 @@ - (void)testSendClusterTest_TC_CC_8_1_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 500U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 500U); + } [expectation fulfill]; }]; @@ -6368,7 +6678,10 @@ - (void)testSendClusterTest_TC_CC_8_1_000006_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -6384,20 +6697,15 @@ - (void)testSendClusterTest_TC_CC_8_1_000007_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 1; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:1]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Color Loop Set Command - Start Color Loop Error: %@", err); @@ -6422,7 +6730,10 @@ - (void)testSendClusterTest_TC_CC_8_1_000008_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -6439,20 +6750,15 @@ - (void)testSendClusterTest_TC_CC_8_1_000009_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 6; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 3500U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:6]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:3500]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Color Loop Set Command - Set direction and time while running Error: %@", err); @@ -6477,7 +6783,10 @@ - (void)testSendClusterTest_TC_CC_8_1_000010_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -6498,7 +6807,10 @@ - (void)testSendClusterTest_TC_CC_8_1_000011_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 3500U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 3500U); + } [expectation fulfill]; }]; @@ -6514,20 +6826,15 @@ - (void)testSendClusterTest_TC_CC_8_1_000012_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 2; - uint8_t actionArgument = 0; - uint8_t directionArgument = 1; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:2]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:1]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Color Loop Set Command - Set direction while running Error: %@", err); @@ -6552,7 +6859,10 @@ - (void)testSendClusterTest_TC_CC_8_1_000013_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -6568,13 +6878,15 @@ - (void)testSendClusterTest_TC_CC_8_1_000014_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -6592,7 +6904,10 @@ - (void)testSendClusterTest_TC_CC_8_1_000015_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -6609,13 +6924,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Precondition : Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Precondition : Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -6633,7 +6950,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -6649,20 +6969,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000002_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -6687,7 +7002,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -6703,20 +7021,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000004_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 2; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:2]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -6741,7 +7054,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -6757,20 +7073,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000006_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 4; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 30U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:4]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:30]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -6795,7 +7106,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 30U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 30U); + } [expectation fulfill]; }]; @@ -6811,20 +7125,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000008_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 8; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 160U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:8]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:160]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -6849,7 +7158,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000009_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 160U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 160U); + } [expectation fulfill]; }]; @@ -6865,20 +7177,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000010_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 1; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:1]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -6903,7 +7210,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000011_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -6919,20 +7229,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000012_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -6957,7 +7262,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000013_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -6973,20 +7281,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000014_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 2; - uint8_t actionArgument = 0; - uint8_t directionArgument = 1; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:2]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:1]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -7011,7 +7314,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000015_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -7027,20 +7333,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000016_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 1; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:1]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -7065,7 +7366,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000017_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -7081,20 +7385,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000018_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -7119,7 +7418,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000019_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -7135,16 +7437,13 @@ - (void)testSendClusterTest_TC_CC_9_1_000020_EnhancedMoveToHue CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t enhancedHueArgument = 40960U; - uint8_t directionArgument = 0; - uint16_t transitionTimeArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveToHue:enhancedHueArgument - direction:directionArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterEnhancedMoveToHuePayload alloc] init]; + payload.EnhancedHue = [NSNumber numberWithUnsignedShort:40960]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster enhancedMoveToHue:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Enhanced Move To Hue command 10 Error: %@", err); @@ -7177,7 +7476,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000022_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 40960U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 40960U); + } [expectation fulfill]; }]; @@ -7193,20 +7495,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000023_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 2; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:2]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -7231,7 +7528,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000024_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -7247,20 +7547,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000025_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 2; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:2]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -7285,7 +7580,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000026_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -7301,20 +7599,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000027_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -7339,7 +7632,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000028_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -7355,20 +7651,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000029_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 2; - uint8_t actionArgument = 0; - uint8_t directionArgument = 1; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:2]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:1]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -7393,7 +7684,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000030_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -7409,20 +7703,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000031_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 2; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:2]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -7447,7 +7736,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000032_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -7463,20 +7755,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000033_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -7501,7 +7788,10 @@ - (void)testSendClusterTest_TC_CC_9_1_000034_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -7517,13 +7807,15 @@ - (void)testSendClusterTest_TC_CC_9_1_000035_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn Off light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn Off light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -7537,13 +7829,15 @@ - (void)testSendClusterTest_TC_CC_9_2_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Precondition: Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Precondition: Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -7562,7 +7856,10 @@ - (void)testSendClusterTest_TC_CC_9_2_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -7578,20 +7875,15 @@ - (void)testSendClusterTest_TC_CC_9_2_000002_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 15; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 30U; - uint16_t startHueArgument = 160U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:15]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:30]; + payload.StartHue = [NSNumber numberWithUnsignedShort:160]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -7616,7 +7908,10 @@ - (void)testSendClusterTest_TC_CC_9_2_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -7637,7 +7932,10 @@ - (void)testSendClusterTest_TC_CC_9_2_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -7658,7 +7956,10 @@ - (void)testSendClusterTest_TC_CC_9_2_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 30U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 30U); + } [expectation fulfill]; }]; @@ -7679,7 +7980,10 @@ - (void)testSendClusterTest_TC_CC_9_2_000006_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 160U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 160U); + } [expectation fulfill]; }]; @@ -7695,20 +7999,15 @@ - (void)testSendClusterTest_TC_CC_9_2_000007_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 1; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:1]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Color Loop Set Command - Set all Attributes Error: %@", err); @@ -7733,7 +8032,10 @@ - (void)testSendClusterTest_TC_CC_9_2_000008_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -7749,20 +8051,15 @@ - (void)testSendClusterTest_TC_CC_9_2_000009_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 2; - uint8_t actionArgument = 0; - uint8_t directionArgument = 1; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:2]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:1]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Color Loop Set Command - Start Color Loop Error: %@", err); @@ -7787,7 +8084,10 @@ - (void)testSendClusterTest_TC_CC_9_2_000010_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -7803,20 +8103,15 @@ - (void)testSendClusterTest_TC_CC_9_2_000011_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Color Loop Set Command - Start Color Loop Error: %@", err); @@ -7841,7 +8136,10 @@ - (void)testSendClusterTest_TC_CC_9_2_000012_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -7857,13 +8155,15 @@ - (void)testSendClusterTest_TC_CC_9_2_000013_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -7877,13 +8177,15 @@ - (void)testSendClusterTest_TC_CC_9_3_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Precondition: Turn on light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Precondition: Turn on light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -7902,7 +8204,10 @@ - (void)testSendClusterTest_TC_CC_9_3_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -7918,20 +8223,15 @@ - (void)testSendClusterTest_TC_CC_9_3_000002_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 15; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 30U; - uint16_t startHueArgument = 160U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:15]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:30]; + payload.StartHue = [NSNumber numberWithUnsignedShort:160]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); @@ -7956,7 +8256,10 @@ - (void)testSendClusterTest_TC_CC_9_3_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -7977,7 +8280,10 @@ - (void)testSendClusterTest_TC_CC_9_3_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -7998,7 +8304,10 @@ - (void)testSendClusterTest_TC_CC_9_3_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 30U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 30U); + } [expectation fulfill]; }]; @@ -8019,7 +8328,10 @@ - (void)testSendClusterTest_TC_CC_9_3_000006_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 160U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 160U); + } [expectation fulfill]; }]; @@ -8035,20 +8347,15 @@ - (void)testSendClusterTest_TC_CC_9_3_000007_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 1; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:1]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Color Loop Set Command - Set all Attributes Error: %@", err); @@ -8073,7 +8380,10 @@ - (void)testSendClusterTest_TC_CC_9_3_000008_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -8089,20 +8399,15 @@ - (void)testSendClusterTest_TC_CC_9_3_000009_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 4; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 60U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:4]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:60]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Color Loop Set Command - Start Color Loop Error: %@", err); @@ -8127,7 +8432,10 @@ - (void)testSendClusterTest_TC_CC_9_3_000010_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 60U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 60U); + } [expectation fulfill]; }]; @@ -8143,20 +8451,15 @@ - (void)testSendClusterTest_TC_CC_9_3_000011_ColorLoopSet CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument + __auto_type * payload = [[CHIPColorControlClusterColorLoopSetPayload alloc] init]; + payload.UpdateFlags = [NSNumber numberWithUnsignedChar:1]; + payload.Action = [NSNumber numberWithUnsignedChar:0]; + payload.Direction = [NSNumber numberWithUnsignedChar:0]; + payload.Time = [NSNumber numberWithUnsignedShort:0]; + payload.StartHue = [NSNumber numberWithUnsignedShort:0]; + payload.OptionsMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionsOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster colorLoopSet:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Color Loop Set Command - Start Color Loop Error: %@", err); @@ -8181,7 +8484,10 @@ - (void)testSendClusterTest_TC_CC_9_3_000012_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -8197,13 +8503,15 @@ - (void)testSendClusterTest_TC_CC_9_3_000013_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light for color control tests Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light for color control tests Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -8625,7 +8933,10 @@ - (void)testSendClusterTest_TC_EMR_1_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 3U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 3U); + } [expectation fulfill]; }]; @@ -8668,7 +8979,10 @@ - (void)testSendClusterTest_TC_EMR_1_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 3U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 3U); + } [expectation fulfill]; }]; @@ -8911,7 +9225,10 @@ - (void)testSendClusterTest_TC_ILL_1_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 2U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 2U); + } [expectation fulfill]; }]; @@ -8958,7 +9275,10 @@ - (void)testSendClusterTest_TC_ILL_1_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 2U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 2U); + } [expectation fulfill]; }]; @@ -9003,7 +9323,10 @@ - (void)testSendClusterTest_TC_LVL_2_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -9019,14 +9342,12 @@ - (void)testSendClusterTest_TC_LVL_2_1_000001_MoveToLevel CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t levelArgument = 64; - uint16_t transitionTimeArgument = 0U; - uint8_t optionMaskArgument = 1; - uint8_t optionOverrideArgument = 1; - [cluster moveToLevel:levelArgument - transitionTime:transitionTimeArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterMoveToLevelPayload alloc] init]; + payload.Level = [NSNumber numberWithUnsignedChar:64]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:0]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:1]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster moveToLevel:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"sends a Move to level command Error: %@", err); @@ -9059,7 +9380,10 @@ - (void)testSendClusterTest_TC_LVL_2_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 64); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 64); + } [expectation fulfill]; }]; @@ -9075,14 +9399,12 @@ - (void)testSendClusterTest_TC_LVL_2_1_000004_MoveToLevel CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t levelArgument = 128; - uint16_t transitionTimeArgument = 1U; - uint8_t optionMaskArgument = 1; - uint8_t optionOverrideArgument = 1; - [cluster moveToLevel:levelArgument - transitionTime:transitionTimeArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterMoveToLevelPayload alloc] init]; + payload.Level = [NSNumber numberWithUnsignedChar:128]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:1]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:1]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster moveToLevel:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"sends a Move to level command Error: %@", err); @@ -9115,7 +9437,10 @@ - (void)testSendClusterTest_TC_LVL_2_1_000006_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 128); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 128); + } [expectation fulfill]; }]; @@ -9136,7 +9461,10 @@ - (void)testSendClusterTest_TC_LVL_2_1_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -9152,14 +9480,12 @@ - (void)testSendClusterTest_TC_LVL_2_1_000008_MoveToLevel CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t levelArgument = 254; - uint16_t transitionTimeArgument = 65535U; - uint8_t optionMaskArgument = 1; - uint8_t optionOverrideArgument = 1; - [cluster moveToLevel:levelArgument - transitionTime:transitionTimeArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterMoveToLevelPayload alloc] init]; + payload.Level = [NSNumber numberWithUnsignedChar:254]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:65535]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:1]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster moveToLevel:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"sends a Move to level command Error: %@", err); @@ -9192,7 +9518,10 @@ - (void)testSendClusterTest_TC_LVL_2_1_000010_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 254); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 254); + } [expectation fulfill]; }]; @@ -9208,14 +9537,12 @@ - (void)testSendClusterTest_TC_LVL_2_1_000011_MoveToLevel CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t levelArgument = 0; - uint16_t transitionTimeArgument = 0U; - uint8_t optionMaskArgument = 1; - uint8_t optionOverrideArgument = 1; - [cluster moveToLevel:levelArgument - transitionTime:transitionTimeArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterMoveToLevelPayload alloc] init]; + payload.Level = [NSNumber numberWithUnsignedChar:0]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:0]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:1]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster moveToLevel:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Reset level to 0 Error: %@", err); @@ -9249,7 +9576,10 @@ - (void)testSendClusterTest_TC_LVL_3_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -9270,7 +9600,10 @@ - (void)testSendClusterTest_TC_LVL_3_1_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 255); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 255); + } [expectation fulfill]; }]; @@ -9286,14 +9619,12 @@ - (void)testSendClusterTest_TC_LVL_3_1_000002_Move CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 0; - uint8_t rateArgument = 200; - uint8_t optionMaskArgument = 1; - uint8_t optionOverrideArgument = 1; - [cluster move:moveModeArgument - rate:rateArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterMovePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:0]; + payload.Rate = [NSNumber numberWithUnsignedChar:200]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:1]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster move:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"sends a Move up command Error: %@", err); @@ -9326,7 +9657,10 @@ - (void)testSendClusterTest_TC_LVL_3_1_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 255); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 255); + } [expectation fulfill]; }]; @@ -9347,7 +9681,10 @@ - (void)testSendClusterTest_TC_LVL_3_1_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -9363,14 +9700,12 @@ - (void)testSendClusterTest_TC_LVL_3_1_000006_Move CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 1; - uint8_t rateArgument = 250; - uint8_t optionMaskArgument = 1; - uint8_t optionOverrideArgument = 1; - [cluster move:moveModeArgument - rate:rateArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterMovePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:1]; + payload.Rate = [NSNumber numberWithUnsignedChar:250]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:1]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster move:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"sends a Move down command Error: %@", err); @@ -9403,7 +9738,10 @@ - (void)testSendClusterTest_TC_LVL_3_1_000008_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -9445,7 +9783,10 @@ - (void)testSendClusterTest_TC_LVL_3_1_000010_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 20); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 20); + } [expectation fulfill]; }]; @@ -9461,14 +9802,12 @@ - (void)testSendClusterTest_TC_LVL_3_1_000011_Move CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 1; - uint8_t rateArgument = 255; - uint8_t optionMaskArgument = 1; - uint8_t optionOverrideArgument = 1; - [cluster move:moveModeArgument - rate:rateArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterMovePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:1]; + payload.Rate = [NSNumber numberWithUnsignedChar:255]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:1]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster move:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"sends a Move up command at default move rate Error: %@", err); @@ -9518,13 +9857,15 @@ - (void)testSendClusterTest_TC_LVL_4_1_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Sending on command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Sending on command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -9537,16 +9878,13 @@ - (void)testSendClusterTest_TC_LVL_4_1_000001_Step CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 0; - uint8_t stepSizeArgument = 128; - uint16_t transitionTimeArgument = 20U; - uint8_t optionMaskArgument = 0; - uint8_t optionOverrideArgument = 0; - [cluster step:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterStepPayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:0]; + payload.StepSize = [NSNumber numberWithUnsignedChar:128]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:20]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster step:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Precondition: DUT level is set to 0x80 Error: %@", err); @@ -9579,7 +9917,10 @@ - (void)testSendClusterTest_TC_LVL_4_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 128); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 128); + } [expectation fulfill]; }]; @@ -9595,16 +9936,13 @@ - (void)testSendClusterTest_TC_LVL_4_1_000004_Step CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 1; - uint8_t stepSizeArgument = 64; - uint16_t transitionTimeArgument = 20U; - uint8_t optionMaskArgument = 0; - uint8_t optionOverrideArgument = 0; - [cluster step:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterStepPayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:1]; + payload.StepSize = [NSNumber numberWithUnsignedChar:64]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:20]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster step:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends step down command to DUT Error: %@", err); @@ -9637,7 +9975,10 @@ - (void)testSendClusterTest_TC_LVL_4_1_000006_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 64); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 64); + } [expectation fulfill]; }]; @@ -9653,16 +9994,13 @@ - (void)testSendClusterTest_TC_LVL_4_1_000007_Step CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 0; - uint8_t stepSizeArgument = 64; - uint16_t transitionTimeArgument = 20U; - uint8_t optionMaskArgument = 0; - uint8_t optionOverrideArgument = 0; - [cluster step:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterStepPayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:0]; + payload.StepSize = [NSNumber numberWithUnsignedChar:64]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:20]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster step:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends a Step up command Error: %@", err); @@ -9695,7 +10033,10 @@ - (void)testSendClusterTest_TC_LVL_4_1_000009_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 128); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 128); + } [expectation fulfill]; }]; @@ -9711,13 +10052,15 @@ - (void)testSendClusterTest_TC_LVL_4_1_000010_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Sending off command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Sending off command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -9731,13 +10074,15 @@ - (void)testSendClusterTest_TC_LVL_5_1_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Sending on command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Sending on command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -9750,16 +10095,13 @@ - (void)testSendClusterTest_TC_LVL_5_1_000001_Step CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 0; - uint8_t stepSizeArgument = 128; - uint16_t transitionTimeArgument = 20U; - uint8_t optionMaskArgument = 0; - uint8_t optionOverrideArgument = 0; - [cluster step:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterStepPayload alloc] init]; + payload.StepMode = [NSNumber numberWithUnsignedChar:0]; + payload.StepSize = [NSNumber numberWithUnsignedChar:128]; + payload.TransitionTime = [NSNumber numberWithUnsignedShort:20]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster step:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Precondition: DUT level is set to 0x80 Error: %@", err); @@ -9787,14 +10129,12 @@ - (void)testSendClusterTest_TC_LVL_5_1_000003_Move CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 0; - uint8_t rateArgument = 1; - uint8_t optionMaskArgument = 1; - uint8_t optionOverrideArgument = 1; - [cluster move:moveModeArgument - rate:rateArgument - optionMask:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterMovePayload alloc] init]; + payload.MoveMode = [NSNumber numberWithUnsignedChar:0]; + payload.Rate = [NSNumber numberWithUnsignedChar:1]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:1]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster move:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends a move up command to DUT Error: %@", err); @@ -9822,10 +10162,10 @@ - (void)testSendClusterTest_TC_LVL_5_1_000005_Stop CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t optionMaskArgument = 0; - uint8_t optionOverrideArgument = 0; - [cluster stop:optionMaskArgument - optionOverride:optionOverrideArgument + __auto_type * payload = [[CHIPLevelControlClusterStopPayload alloc] init]; + payload.OptionMask = [NSNumber numberWithUnsignedChar:0]; + payload.OptionOverride = [NSNumber numberWithUnsignedChar:0]; + [cluster stop:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Sends stop command to DUT Error: %@", err); @@ -9845,13 +10185,15 @@ - (void)testSendClusterTest_TC_LVL_5_1_000006_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Sending off command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Sending off command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -9890,13 +10232,15 @@ - (void)testSendClusterTest_TC_MC_2_1_000000_Sleep CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster sleep:^(NSError * err, NSDictionary * values) { - NSLog(@"Put the device into low power mode Error: %@", err); + __auto_type * payload = [[CHIPLowPowerClusterSleepPayload alloc] init]; + [cluster sleep:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Put the device into low power mode Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -9915,7 +10259,10 @@ - (void)testSendClusterTest_TC_OCC_1_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 2U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 2U); + } [expectation fulfill]; }]; @@ -10001,7 +10348,10 @@ - (void)testSendClusterTest_TC_OCC_2_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -10067,7 +10417,10 @@ - (void)testSendClusterTest_TC_OCC_2_1_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -10135,7 +10488,10 @@ - (void)testSendClusterTest_TC_OCC_2_1_000008_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -10196,7 +10552,10 @@ - (void)testSendClusterTest_TC_OO_1_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 4U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 4U); + } [expectation fulfill]; }]; @@ -10239,7 +10598,10 @@ - (void)testSendClusterTest_TC_OO_1_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 4U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 4U); + } [expectation fulfill]; }]; @@ -10260,7 +10622,10 @@ - (void)testSendClusterTest_TC_OO_1_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 0UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } [expectation fulfill]; }]; @@ -10302,7 +10667,10 @@ - (void)testSendClusterTest_TC_OO_1_1_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 0UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } [expectation fulfill]; }]; @@ -10324,7 +10692,10 @@ - (void)testSendClusterTest_TC_OO_2_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -10345,7 +10716,10 @@ - (void)testSendClusterTest_TC_OO_2_1_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -10366,7 +10740,10 @@ - (void)testSendClusterTest_TC_OO_2_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -10387,7 +10764,10 @@ - (void)testSendClusterTest_TC_OO_2_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -10408,7 +10788,10 @@ - (void)testSendClusterTest_TC_OO_2_1_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -10429,7 +10812,10 @@ - (void)testSendClusterTest_TC_OO_2_1_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -10513,7 +10899,10 @@ - (void)testSendClusterTest_TC_OO_2_1_000009_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -10534,7 +10923,10 @@ - (void)testSendClusterTest_TC_OO_2_1_000010_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -10555,7 +10947,10 @@ - (void)testSendClusterTest_TC_OO_2_1_000011_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -10572,13 +10967,15 @@ - (void)testSendClusterTest_TC_OO_2_2_000000_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Off Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Off Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -10596,7 +10993,10 @@ - (void)testSendClusterTest_TC_OO_2_2_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -10612,13 +11012,15 @@ - (void)testSendClusterTest_TC_OO_2_2_000002_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Send On Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send On Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -10636,7 +11038,10 @@ - (void)testSendClusterTest_TC_OO_2_2_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -10652,13 +11057,15 @@ - (void)testSendClusterTest_TC_OO_2_2_000004_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Off Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Off Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -10676,7 +11083,10 @@ - (void)testSendClusterTest_TC_OO_2_2_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -10692,13 +11102,15 @@ - (void)testSendClusterTest_TC_OO_2_2_000006_Toggle CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster toggle:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Toggle Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterTogglePayload alloc] init]; + [cluster toggle:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Toggle Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -10717,7 +11129,10 @@ - (void)testSendClusterTest_TC_OO_2_2_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -10733,13 +11148,15 @@ - (void)testSendClusterTest_TC_OO_2_2_000008_Toggle CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster toggle:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Toggle Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterTogglePayload alloc] init]; + [cluster toggle:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Toggle Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -10758,7 +11175,10 @@ - (void)testSendClusterTest_TC_OO_2_2_000009_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -10774,13 +11194,15 @@ - (void)testSendClusterTest_TC_OO_2_2_000010_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Send On Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send On Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -10798,7 +11220,10 @@ - (void)testSendClusterTest_TC_OO_2_2_000011_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -10814,13 +11239,15 @@ - (void)testSendClusterTest_TC_OO_2_2_000012_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Off Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Off Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -10838,7 +11265,10 @@ - (void)testSendClusterTest_TC_OO_2_2_000013_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -10855,13 +11285,15 @@ - (void)testSendClusterTest_TC_OO_2_3_000000_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Send On Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send On Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -10887,7 +11319,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -10908,7 +11343,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -10924,13 +11362,15 @@ - (void)testSendClusterTest_TC_OO_2_3_000004_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Send On Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send On Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -10956,7 +11396,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000006_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -10977,7 +11420,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -10993,13 +11439,15 @@ - (void)testSendClusterTest_TC_OO_2_3_000008_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Send On Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send On Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -11025,7 +11473,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000010_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -11046,7 +11497,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000011_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -11067,7 +11521,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000012_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11088,7 +11545,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000013_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11104,13 +11564,15 @@ - (void)testSendClusterTest_TC_OO_2_3_000014_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Send On Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send On Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -11128,7 +11590,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000015_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -11149,7 +11614,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000016_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11170,7 +11638,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000017_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11186,13 +11657,15 @@ - (void)testSendClusterTest_TC_OO_2_3_000018_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Off Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Off Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -11210,7 +11683,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000019_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -11231,7 +11707,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000020_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11252,7 +11731,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000021_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -11273,7 +11755,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000022_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11294,7 +11779,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000023_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11310,13 +11798,15 @@ - (void)testSendClusterTest_TC_OO_2_3_000024_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Send On Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send On Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -11334,7 +11824,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000025_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11355,7 +11848,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000026_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11371,13 +11867,15 @@ - (void)testSendClusterTest_TC_OO_2_3_000027_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Off Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Off Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -11395,7 +11893,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000028_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -11416,7 +11917,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000029_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11437,7 +11941,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000030_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -11458,7 +11965,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000031_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11474,13 +11984,15 @@ - (void)testSendClusterTest_TC_OO_2_3_000032_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Send On Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send On Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -11498,7 +12010,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000033_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -11519,7 +12034,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000034_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11540,7 +12058,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000035_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11556,13 +12077,15 @@ - (void)testSendClusterTest_TC_OO_2_3_000036_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Off Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Off Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -11580,7 +12103,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000037_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -11601,7 +12127,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000038_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11622,7 +12151,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000039_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -11643,7 +12175,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000040_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11664,7 +12199,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000041_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11685,7 +12223,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000042_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -11706,7 +12247,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000043_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11727,7 +12271,10 @@ - (void)testSendClusterTest_TC_OO_2_3_000044_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -11743,13 +12290,15 @@ - (void)testSendClusterTest_TC_OO_2_3_000045_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Off Command Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Off Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -11768,7 +12317,10 @@ - (void)testSendClusterTest_TC_PRS_1_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 2U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 2U); + } [expectation fulfill]; }]; @@ -11830,7 +12382,10 @@ - (void)testSendClusterTest_TC_PRS_1_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 2U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 2U); + } [expectation fulfill]; }]; @@ -11892,7 +12447,10 @@ - (void)testSendClusterTest_TC_PRS_2_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 0); + } [expectation fulfill]; }]; @@ -11954,7 +12512,10 @@ - (void)testSendClusterTest_TC_PRS_2_1_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 0); + } [expectation fulfill]; }]; @@ -12016,7 +12577,10 @@ - (void)testSendClusterTest_TC_PRS_2_1_000008_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 0); + } [expectation fulfill]; }]; @@ -12330,7 +12894,10 @@ - (void)testSendClusterTest_TC_PCC_2_3_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -12467,7 +13034,10 @@ - (void)testSendClusterTest_TC_TM_1_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 3U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 3U); + } [expectation fulfill]; }]; @@ -12514,7 +13084,10 @@ - (void)testSendClusterTest_TC_TM_1_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 3U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 3U); + } [expectation fulfill]; }]; @@ -12645,7 +13218,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 700); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 700); + } [expectation fulfill]; }]; @@ -12713,7 +13289,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 700); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 700); + } [expectation fulfill]; }]; @@ -12735,7 +13314,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 3000); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 3000); + } [expectation fulfill]; }]; @@ -12803,7 +13385,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000008_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 3000); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 3000); + } [expectation fulfill]; }]; @@ -12825,7 +13410,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000009_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 1600); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 1600); + } [expectation fulfill]; }]; @@ -12893,7 +13481,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000012_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 1600); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 1600); + } [expectation fulfill]; }]; @@ -12915,7 +13506,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000013_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 3200); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 3200); + } [expectation fulfill]; }]; @@ -12983,7 +13577,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000016_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 3200); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 3200); + } [expectation fulfill]; }]; @@ -13005,7 +13602,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000017_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 2600); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 2600); + } [expectation fulfill]; }]; @@ -13074,7 +13674,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000020_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 2600); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 2600); + } [expectation fulfill]; }]; @@ -13096,7 +13699,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000021_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 2000); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 2000); + } [expectation fulfill]; }]; @@ -13165,7 +13771,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000024_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 2000); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 2000); + } [expectation fulfill]; }]; @@ -13187,7 +13796,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000025_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 700); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 700); + } [expectation fulfill]; }]; @@ -13256,7 +13868,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000028_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 700); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 700); + } [expectation fulfill]; }]; @@ -13278,7 +13893,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000029_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 3000); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 3000); + } [expectation fulfill]; }]; @@ -13347,7 +13965,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000032_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 3000); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 3000); + } [expectation fulfill]; }]; @@ -13369,7 +13990,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000033_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 1600); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 1600); + } [expectation fulfill]; }]; @@ -13438,7 +14062,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000036_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 1600); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 1600); + } [expectation fulfill]; }]; @@ -13460,7 +14087,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000037_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 3200); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 3200); + } [expectation fulfill]; }]; @@ -13529,7 +14159,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000040_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 3200); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 3200); + } [expectation fulfill]; }]; @@ -13551,7 +14184,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000041_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 4); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 4); + } [expectation fulfill]; }]; @@ -13620,7 +14256,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000044_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 4); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 4); + } [expectation fulfill]; }]; @@ -13641,7 +14280,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000045_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -13708,7 +14350,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000048_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } [expectation fulfill]; }]; @@ -13729,7 +14374,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000049_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] charValue], 25); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue charValue], 25); + } [expectation fulfill]; }]; @@ -13797,7 +14445,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000052_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] charValue], 25); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue charValue], 25); + } [expectation fulfill]; }]; @@ -13863,7 +14514,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000055_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -13996,7 +14650,10 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14060,7 +14717,10 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14102,7 +14762,10 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14166,7 +14829,10 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000008_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14209,7 +14875,10 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000010_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14278,7 +14947,10 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000013_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14554,7 +15226,10 @@ - (void)testSendClusterTest_TC_DIAGTH_1_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 1U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } [expectation fulfill]; }]; @@ -14601,7 +15276,10 @@ - (void)testSendClusterTest_TC_DIAGTH_1_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 1U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } [expectation fulfill]; }]; @@ -14623,7 +15301,10 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 5U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 5U); + } [expectation fulfill]; }]; @@ -14666,7 +15347,10 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 5U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 5U); + } [expectation fulfill]; }]; @@ -14687,7 +15371,10 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 0UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } [expectation fulfill]; }]; @@ -14708,7 +15395,10 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 0UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } [expectation fulfill]; }]; @@ -14730,7 +15420,10 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14751,7 +15444,10 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14772,7 +15468,10 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 3); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 3); + } [expectation fulfill]; }]; @@ -14793,7 +15492,10 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 3); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 3); + } [expectation fulfill]; }]; @@ -14815,7 +15517,10 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14836,7 +15541,10 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14857,7 +15565,10 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000006_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14878,7 +15589,10 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14899,7 +15613,10 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000008_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -14941,7 +15658,10 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000010_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 7); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 7); + } [expectation fulfill]; }]; @@ -14963,7 +15683,10 @@ - (void)testSendClusterTest_TC_WNCV_2_5_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -15001,13 +15724,15 @@ - (void)testSendClusterTest_TC_WNCV_3_1_000000_DownOrClose CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster downOrClose:^(NSError * err, NSDictionary * values) { - NSLog(@"1a: TH adjusts the the DUT to a non-open position Error: %@", err); + __auto_type * payload = [[CHIPWindowCoveringClusterDownOrClosePayload alloc] init]; + [cluster downOrClose:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"1a: TH adjusts the the DUT to a non-open position Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -15020,13 +15745,15 @@ - (void)testSendClusterTest_TC_WNCV_3_1_000001_UpOrOpen CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster upOrOpen:^(NSError * err, NSDictionary * values) { - NSLog(@"2a: TH sends UpOrOpen command to DUT Error: %@", err); + __auto_type * payload = [[CHIPWindowCoveringClusterUpOrOpenPayload alloc] init]; + [cluster upOrOpen:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"2a: TH sends UpOrOpen command to DUT Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -15044,7 +15771,10 @@ - (void)testSendClusterTest_TC_WNCV_3_1_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -15061,13 +15791,15 @@ - (void)testSendClusterTest_TC_WNCV_3_2_000000_UpOrOpen CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster upOrOpen:^(NSError * err, NSDictionary * values) { - NSLog(@"1a: TH adjusts the the DUT to a non-closed position Error: %@", err); + __auto_type * payload = [[CHIPWindowCoveringClusterUpOrOpenPayload alloc] init]; + [cluster upOrOpen:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"1a: TH adjusts the the DUT to a non-closed position Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -15080,13 +15812,15 @@ - (void)testSendClusterTest_TC_WNCV_3_2_000001_DownOrClose CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster downOrClose:^(NSError * err, NSDictionary * values) { - NSLog(@"2a: TH sends DownOrClose command to DUT Error: %@", err); + __auto_type * payload = [[CHIPWindowCoveringClusterDownOrClosePayload alloc] init]; + [cluster downOrClose:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"2a: TH sends DownOrClose command to DUT Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -15104,7 +15838,10 @@ - (void)testSendClusterTest_TC_WNCV_3_2_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -15121,13 +15858,15 @@ - (void)testSendClusterTest_TC_WNCV_3_3_000000_UpOrOpen CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster upOrOpen:^(NSError * err, NSDictionary * values) { - NSLog(@"1a: TH adjusts the the DUT to a non-open position Error: %@", err); + __auto_type * payload = [[CHIPWindowCoveringClusterUpOrOpenPayload alloc] init]; + [cluster upOrOpen:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"1a: TH adjusts the the DUT to a non-open position Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -15140,13 +15879,15 @@ - (void)testSendClusterTest_TC_WNCV_3_3_000001_StopMotion CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster stopMotion:^(NSError * err, NSDictionary * values) { - NSLog(@"2a: TH sends StopMotion command to DUT Error: %@", err); + __auto_type * payload = [[CHIPWindowCoveringClusterStopMotionPayload alloc] init]; + [cluster stopMotion:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"2a: TH sends StopMotion command to DUT Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -15164,7 +15905,10 @@ - (void)testSendClusterTest_TC_WNCV_3_3_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -15181,13 +15925,15 @@ - (void)testSendClusterTestCluster_000000_Test CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster test:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Test Command Error: %@", err); + __auto_type * payload = [[CHIPTestClusterClusterTestPayload alloc] init]; + [cluster test:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -15200,12 +15946,14 @@ - (void)testSendClusterTestCluster_000001_TestNotHandled CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster testNotHandled:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Test Not Handled Command Error: %@", err); + __auto_type * payload = [[CHIPTestClusterClusterTestNotHandledPayload alloc] init]; + [cluster testNotHandled:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Not Handled Command Error: %@", err); - XCTAssertEqual(err.code, 1); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -15218,15 +15966,20 @@ - (void)testSendClusterTestCluster_000002_TestSpecific CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster testSpecific:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Test Specific Command Error: %@", err); + __auto_type * payload = [[CHIPTestClusterClusterTestSpecificPayload alloc] init]; + [cluster testSpecific:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Specific Command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"returnValue"] unsignedCharValue], 7); + { + id actualValue = values[@"ReturnValue"]; + XCTAssertEqual([actualValue unsignedCharValue], 7); + } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -15239,16 +15992,19 @@ - (void)testSendClusterTestCluster_000003_TestAddArguments CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t arg1Argument = 3; - uint8_t arg2Argument = 17; - [cluster testAddArguments:arg1Argument - arg2:arg2Argument + __auto_type * payload = [[CHIPTestClusterClusterTestAddArgumentsPayload alloc] init]; + payload.Arg1 = [NSNumber numberWithUnsignedChar:3]; + payload.Arg2 = [NSNumber numberWithUnsignedChar:17]; + [cluster testAddArguments:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Send Test Add Arguments Command Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"returnValue"] unsignedCharValue], 20); + { + id actualValue = values[@"ReturnValue"]; + XCTAssertEqual([actualValue unsignedCharValue], 20); + } [expectation fulfill]; }]; @@ -15264,10 +16020,10 @@ - (void)testSendClusterTestCluster_000004_TestAddArguments CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t arg1Argument = 250; - uint8_t arg2Argument = 6; - [cluster testAddArguments:arg1Argument - arg2:arg2Argument + __auto_type * payload = [[CHIPTestClusterClusterTestAddArgumentsPayload alloc] init]; + payload.Arg1 = [NSNumber numberWithUnsignedChar:250]; + payload.Arg2 = [NSNumber numberWithUnsignedChar:6]; + [cluster testAddArguments:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Send failing Test Add Arguments Command Error: %@", err); @@ -15291,7 +16047,10 @@ - (void)testSendClusterTestCluster_000005_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -15333,7 +16092,10 @@ - (void)testSendClusterTestCluster_000007_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 1); + } [expectation fulfill]; }]; @@ -15375,7 +16137,10 @@ - (void)testSendClusterTestCluster_000009_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -15396,7 +16161,10 @@ - (void)testSendClusterTestCluster_000010_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -15438,7 +16206,10 @@ - (void)testSendClusterTestCluster_000012_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 255); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 255); + } [expectation fulfill]; }]; @@ -15480,7 +16251,10 @@ - (void)testSendClusterTestCluster_000014_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -15501,7 +16275,10 @@ - (void)testSendClusterTestCluster_000015_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -15543,7 +16320,10 @@ - (void)testSendClusterTestCluster_000017_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 65535U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 65535U); + } [expectation fulfill]; }]; @@ -15585,7 +16365,10 @@ - (void)testSendClusterTestCluster_000019_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -15606,7 +16389,10 @@ - (void)testSendClusterTestCluster_000020_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 0UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } [expectation fulfill]; }]; @@ -15648,7 +16434,10 @@ - (void)testSendClusterTestCluster_000022_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 4294967295UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 4294967295UL); + } [expectation fulfill]; }]; @@ -15690,7 +16479,10 @@ - (void)testSendClusterTestCluster_000024_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 0UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } [expectation fulfill]; }]; @@ -15711,7 +16503,10 @@ - (void)testSendClusterTestCluster_000025_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongLongValue], 0ULL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); + } [expectation fulfill]; }]; @@ -15753,7 +16548,10 @@ - (void)testSendClusterTestCluster_000027_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongLongValue], 18446744073709551615ULL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedLongLongValue], 18446744073709551615ULL); + } [expectation fulfill]; }]; @@ -15795,7 +16593,10 @@ - (void)testSendClusterTestCluster_000029_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongLongValue], 0ULL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); + } [expectation fulfill]; }]; @@ -15816,7 +16617,10 @@ - (void)testSendClusterTestCluster_000030_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -15858,7 +16662,10 @@ - (void)testSendClusterTestCluster_000032_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 255); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 255); + } [expectation fulfill]; }]; @@ -15900,7 +16707,10 @@ - (void)testSendClusterTestCluster_000034_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -15921,7 +16731,10 @@ - (void)testSendClusterTestCluster_000035_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -15963,7 +16776,10 @@ - (void)testSendClusterTestCluster_000037_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 65535U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 65535U); + } [expectation fulfill]; }]; @@ -16005,7 +16821,10 @@ - (void)testSendClusterTestCluster_000039_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -16026,7 +16845,10 @@ - (void)testSendClusterTestCluster_000040_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 0UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } [expectation fulfill]; }]; @@ -16068,7 +16890,10 @@ - (void)testSendClusterTestCluster_000042_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 4294967295UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 4294967295UL); + } [expectation fulfill]; }]; @@ -16110,7 +16935,10 @@ - (void)testSendClusterTestCluster_000044_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 0UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } [expectation fulfill]; }]; @@ -16131,7 +16959,10 @@ - (void)testSendClusterTestCluster_000045_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongLongValue], 0ULL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); + } [expectation fulfill]; }]; @@ -16173,7 +17004,10 @@ - (void)testSendClusterTestCluster_000047_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongLongValue], 18446744073709551615ULL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedLongLongValue], 18446744073709551615ULL); + } [expectation fulfill]; }]; @@ -16215,7 +17049,10 @@ - (void)testSendClusterTestCluster_000049_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongLongValue], 0ULL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); + } [expectation fulfill]; }]; @@ -16236,7 +17073,10 @@ - (void)testSendClusterTestCluster_000050_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] charValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue charValue], 0); + } [expectation fulfill]; }]; @@ -16278,7 +17118,10 @@ - (void)testSendClusterTestCluster_000052_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] charValue], 127); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue charValue], 127); + } [expectation fulfill]; }]; @@ -16320,7 +17163,10 @@ - (void)testSendClusterTestCluster_000054_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] charValue], -128); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue charValue], -128); + } [expectation fulfill]; }]; @@ -16362,7 +17208,10 @@ - (void)testSendClusterTestCluster_000056_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] charValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue charValue], 0); + } [expectation fulfill]; }]; @@ -16383,7 +17232,10 @@ - (void)testSendClusterTestCluster_000057_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 0); + } [expectation fulfill]; }]; @@ -16425,7 +17277,10 @@ - (void)testSendClusterTestCluster_000059_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 32767); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 32767); + } [expectation fulfill]; }]; @@ -16467,7 +17322,10 @@ - (void)testSendClusterTestCluster_000061_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], -32768); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], -32768); + } [expectation fulfill]; }]; @@ -16509,7 +17367,10 @@ - (void)testSendClusterTestCluster_000063_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] shortValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue shortValue], 0); + } [expectation fulfill]; }]; @@ -16530,7 +17391,10 @@ - (void)testSendClusterTestCluster_000064_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] longValue], 0L); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue intValue], 0L); + } [expectation fulfill]; }]; @@ -16572,7 +17436,10 @@ - (void)testSendClusterTestCluster_000066_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] longValue], 2147483647L); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue intValue], 2147483647L); + } [expectation fulfill]; }]; @@ -16614,7 +17481,10 @@ - (void)testSendClusterTestCluster_000068_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] longValue], -2147483648L); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue intValue], -2147483648L); + } [expectation fulfill]; }]; @@ -16656,7 +17526,10 @@ - (void)testSendClusterTestCluster_000070_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] longValue], 0L); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue intValue], 0L); + } [expectation fulfill]; }]; @@ -16677,7 +17550,10 @@ - (void)testSendClusterTestCluster_000071_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] longLongValue], 0LL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue longLongValue], 0LL); + } [expectation fulfill]; }]; @@ -16719,7 +17595,10 @@ - (void)testSendClusterTestCluster_000073_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] longLongValue], 9223372036854775807LL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue longLongValue], 9223372036854775807LL); + } [expectation fulfill]; }]; @@ -16761,7 +17640,10 @@ - (void)testSendClusterTestCluster_000075_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] longLongValue], -9223372036854775807LL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue longLongValue], -9223372036854775807LL); + } [expectation fulfill]; }]; @@ -16803,7 +17685,10 @@ - (void)testSendClusterTestCluster_000077_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] longLongValue], 0LL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue longLongValue], 0LL); + } [expectation fulfill]; }]; @@ -16824,7 +17709,10 @@ - (void)testSendClusterTestCluster_000078_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -16866,7 +17754,10 @@ - (void)testSendClusterTestCluster_000080_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 255); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 255); + } [expectation fulfill]; }]; @@ -16908,7 +17799,10 @@ - (void)testSendClusterTestCluster_000082_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -16929,7 +17823,10 @@ - (void)testSendClusterTestCluster_000083_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -16971,7 +17868,10 @@ - (void)testSendClusterTestCluster_000085_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 65535U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 65535U); + } [expectation fulfill]; }]; @@ -17013,7 +17913,10 @@ - (void)testSendClusterTestCluster_000087_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -17034,8 +17937,10 @@ - (void)testSendClusterTestCluster_000088_ReadAttribute XCTAssertEqual(err.code, 0); - NSData * octetStringArgument = [[NSData alloc] initWithBytes:"" length:0]; - XCTAssertTrue([values[@"value"] isEqualToData:octetStringArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue isEqualToData:[[NSData alloc] initWithBytes:"" length:0]]); + } [expectation fulfill]; }]; @@ -17077,8 +17982,10 @@ - (void)testSendClusterTestCluster_000090_ReadAttribute XCTAssertEqual(err.code, 0); - NSData * octetStringArgument = [[NSData alloc] initWithBytes:"Tes\x00ti\x00ng" length:9]; - XCTAssertTrue([values[@"value"] isEqualToData:octetStringArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue isEqualToData:[[NSData alloc] initWithBytes:"Tes\x00ti\x00ng" length:9]]); + } [expectation fulfill]; }]; @@ -17120,8 +18027,10 @@ - (void)testSendClusterTestCluster_000092_ReadAttribute XCTAssertEqual(err.code, 0); - NSData * octetStringArgument = [[NSData alloc] initWithBytes:"TestValue" length:9]; - XCTAssertTrue([values[@"value"] isEqualToData:octetStringArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue isEqualToData:[[NSData alloc] initWithBytes:"TestValue" length:9]]); + } [expectation fulfill]; }]; @@ -17162,8 +18071,10 @@ - (void)testSendClusterTestCluster_000094_ReadAttribute XCTAssertEqual(err.code, 0); - NSData * octetStringArgument = [[NSData alloc] initWithBytes:"TestValue" length:9]; - XCTAssertTrue([values[@"value"] isEqualToData:octetStringArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue isEqualToData:[[NSData alloc] initWithBytes:"TestValue" length:9]]); + } [expectation fulfill]; }]; @@ -17205,8 +18116,10 @@ - (void)testSendClusterTestCluster_000096_ReadAttribute XCTAssertEqual(err.code, 0); - NSData * longOctetStringArgument = [[NSData alloc] initWithBytes:"" length:0]; - XCTAssertTrue([values[@"value"] isEqualToData:longOctetStringArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue isEqualToData:[[NSData alloc] initWithBytes:"" length:0]]); + } [expectation fulfill]; }]; @@ -17252,12 +18165,16 @@ - (void)testSendClusterTestCluster_000098_ReadAttribute XCTAssertEqual(err.code, 0); - NSData * longOctetStringArgument = [[NSData alloc] - initWithBytes:"11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - length:300]; - XCTAssertTrue([values[@"value"] isEqualToData:longOctetStringArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue + isEqualToData:[[NSData alloc] + initWithBytes:"1111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "1111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "1111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "111111111111111111111111111111111111111111111111111111" + length:300]]); + } [expectation fulfill]; }]; @@ -17299,8 +18216,10 @@ - (void)testSendClusterTestCluster_000100_ReadAttribute XCTAssertEqual(err.code, 0); - NSString * charStringArgument = @""; - XCTAssertTrue([values[@"value"] isEqualToString:charStringArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue isEqualToString:@""]); + } [expectation fulfill]; }]; @@ -17383,8 +18302,10 @@ - (void)testSendClusterTestCluster_000104_ReadAttribute XCTAssertEqual(err.code, 0); - NSString * longCharStringArgument = @""; - XCTAssertTrue([values[@"value"] isEqualToString:longCharStringArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue isEqualToString:@""]); + } [expectation fulfill]; }]; @@ -17429,11 +18350,14 @@ - (void)testSendClusterTestCluster_000106_ReadAttribute XCTAssertEqual(err.code, 0); - NSString * longCharStringArgument - = @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" - @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" - @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉"; - XCTAssertTrue([values[@"value"] isEqualToString:longCharStringArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue + isEqualToString: + @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" + @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" + @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉"]); + } [expectation fulfill]; }]; @@ -17475,7 +18399,10 @@ - (void)testSendClusterTestCluster_000108_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongLongValue], 0ULL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); + } [expectation fulfill]; }]; @@ -17517,7 +18444,10 @@ - (void)testSendClusterTestCluster_000110_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongLongValue], 18446744073709551615ULL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedLongLongValue], 18446744073709551615ULL); + } [expectation fulfill]; }]; @@ -17559,7 +18489,10 @@ - (void)testSendClusterTestCluster_000112_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongLongValue], 0ULL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); + } [expectation fulfill]; }]; @@ -17580,7 +18513,10 @@ - (void)testSendClusterTestCluster_000113_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 0UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } [expectation fulfill]; }]; @@ -17622,7 +18558,10 @@ - (void)testSendClusterTestCluster_000115_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 4294967295UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 4294967295UL); + } [expectation fulfill]; }]; @@ -17664,7 +18603,10 @@ - (void)testSendClusterTestCluster_000117_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedLongValue], 0UL); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } [expectation fulfill]; }]; @@ -17690,7 +18632,10 @@ - (void)testSendClusterTestCluster_000118_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], 0); + } [expectation fulfill]; }]; @@ -17732,12 +18677,14 @@ - (void)testSendClusterTestCluster_000120_Test CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:200 queue:queue]; XCTAssertNotNil(cluster); - [cluster test:^(NSError * err, NSDictionary * values) { - NSLog(@"Send Test Command to unsupported endpoint Error: %@", err); + __auto_type * payload = [[CHIPTestClusterClusterTestPayload alloc] init]; + [cluster test:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command to unsupported endpoint Error: %@", err); - XCTAssertEqual(err.code, 1); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -17755,7 +18702,10 @@ - (void)testSendClusterTestCluster_000121_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 0U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 0U); + } [expectation fulfill]; }]; @@ -17797,7 +18747,10 @@ - (void)testSendClusterTestCluster_000123_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 17U); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedShortValue], 17U); + } [expectation fulfill]; }]; @@ -17834,23 +18787,421 @@ - (void)testSendClusterTestCluster_000125_TestEnumsRequest CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t arg1Argument = 20003U; - uint8_t arg2Argument = 101; - [cluster testEnumsRequest:arg1Argument - arg2:arg2Argument + __auto_type * payload = [[CHIPTestClusterClusterTestEnumsRequestPayload alloc] init]; + payload.Arg1 = [NSNumber numberWithUnsignedShort:20003]; + payload.Arg2 = [NSNumber numberWithUnsignedChar:101]; + [cluster testEnumsRequest:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Send a command with a vendor_id and enum Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"arg1"] unsignedShortValue], 20003U); - XCTAssertEqual([values[@"arg2"] unsignedCharValue], 101); + { + id actualValue = values[@"Arg1"]; + XCTAssertEqual([actualValue unsignedShortValue], 20003U); + } + { + id actualValue = values[@"Arg2"]; + XCTAssertEqual([actualValue unsignedCharValue], 101); + } [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTestCluster_000126_TestStructArgumentRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Send Test Command With Struct Argument and arg1.b is true"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * payload = [[CHIPTestClusterClusterTestStructArgumentRequestPayload alloc] init]; + payload.Arg1 = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).A = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).B = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).C = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).D = [[NSData alloc] initWithBytes:"octet_string" length:12]; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).E = @"char_string"; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).F = [NSNumber numberWithUnsignedChar:1]; + + [cluster testStructArgumentRequest:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command With Struct Argument and arg1.b is true Error: %@", err); + + XCTAssertEqual(err.code, 0); + + { + id actualValue = values[@"Value"]; + XCTAssertEqual([actualValue boolValue], true); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000127_TestStructArgumentRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Send Test Command With Struct Argument and arg1.b is false"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * payload = [[CHIPTestClusterClusterTestStructArgumentRequestPayload alloc] init]; + payload.Arg1 = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).A = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).B = [NSNumber numberWithBool:false]; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).C = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).D = [[NSData alloc] initWithBytes:"octet_string" length:12]; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).E = @"char_string"; + ((CHIPTestClusterClusterSimpleStruct *) payload.Arg1).F = [NSNumber numberWithUnsignedChar:1]; + + [cluster testStructArgumentRequest:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command With Struct Argument and arg1.b is false Error: %@", err); + + XCTAssertEqual(err.code, 0); + + { + id actualValue = values[@"Value"]; + XCTAssertEqual([actualValue boolValue], false); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000128_TestListInt8UArgumentRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Send Test Command With List of INT8U and none of them is set to 0"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * payload = [[CHIPTestClusterClusterTestListInt8UArgumentRequestPayload alloc] init]; + { + NSMutableArray * temp = [[NSMutableArray alloc] init]; + temp[0] = [NSNumber numberWithUnsignedChar:1]; + temp[1] = [NSNumber numberWithUnsignedChar:2]; + temp[2] = [NSNumber numberWithUnsignedChar:3]; + temp[3] = [NSNumber numberWithUnsignedChar:4]; + temp[4] = [NSNumber numberWithUnsignedChar:5]; + temp[5] = [NSNumber numberWithUnsignedChar:6]; + temp[6] = [NSNumber numberWithUnsignedChar:7]; + temp[7] = [NSNumber numberWithUnsignedChar:8]; + temp[8] = [NSNumber numberWithUnsignedChar:9]; + payload.Arg1 = temp; + } + [cluster testListInt8UArgumentRequest:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command With List of INT8U and none of them is set to 0 Error: %@", err); + + XCTAssertEqual(err.code, 0); + + { + id actualValue = values[@"Value"]; + XCTAssertEqual([actualValue boolValue], true); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000129_TestListInt8UArgumentRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Send Test Command With List of INT8U and one of them is set to 0"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * payload = [[CHIPTestClusterClusterTestListInt8UArgumentRequestPayload alloc] init]; + { + NSMutableArray * temp = [[NSMutableArray alloc] init]; + temp[0] = [NSNumber numberWithUnsignedChar:1]; + temp[1] = [NSNumber numberWithUnsignedChar:2]; + temp[2] = [NSNumber numberWithUnsignedChar:3]; + temp[3] = [NSNumber numberWithUnsignedChar:4]; + temp[4] = [NSNumber numberWithUnsignedChar:5]; + temp[5] = [NSNumber numberWithUnsignedChar:6]; + temp[6] = [NSNumber numberWithUnsignedChar:7]; + temp[7] = [NSNumber numberWithUnsignedChar:8]; + temp[8] = [NSNumber numberWithUnsignedChar:9]; + temp[9] = [NSNumber numberWithUnsignedChar:0]; + payload.Arg1 = temp; + } + [cluster testListInt8UArgumentRequest:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command With List of INT8U and one of them is set to 0 Error: %@", err); + + XCTAssertEqual(err.code, 0); + + { + id actualValue = values[@"Value"]; + XCTAssertEqual([actualValue boolValue], false); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000130_TestListInt8UReverseRequest +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With List of INT8U and get it reversed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * payload = [[CHIPTestClusterClusterTestListInt8UReverseRequestPayload alloc] init]; + { + NSMutableArray * temp = [[NSMutableArray alloc] init]; + temp[0] = [NSNumber numberWithUnsignedChar:1]; + temp[1] = [NSNumber numberWithUnsignedChar:2]; + temp[2] = [NSNumber numberWithUnsignedChar:3]; + temp[3] = [NSNumber numberWithUnsignedChar:4]; + temp[4] = [NSNumber numberWithUnsignedChar:5]; + temp[5] = [NSNumber numberWithUnsignedChar:6]; + temp[6] = [NSNumber numberWithUnsignedChar:7]; + temp[7] = [NSNumber numberWithUnsignedChar:8]; + temp[8] = [NSNumber numberWithUnsignedChar:9]; + payload.Arg1 = temp; + } + [cluster testListInt8UReverseRequest:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command With List of INT8U and get it reversed Error: %@", err); + + XCTAssertEqual(err.code, 0); + + { + id actualValue = values[@"Arg1"]; + XCTAssertEqual([actualValue count], 9); + XCTAssertEqual([actualValue[0] unsignedCharValue], 9); + XCTAssertEqual([actualValue[1] unsignedCharValue], 8); + XCTAssertEqual([actualValue[2] unsignedCharValue], 7); + XCTAssertEqual([actualValue[3] unsignedCharValue], 6); + XCTAssertEqual([actualValue[4] unsignedCharValue], 5); + XCTAssertEqual([actualValue[5] unsignedCharValue], 4); + XCTAssertEqual([actualValue[6] unsignedCharValue], 3); + XCTAssertEqual([actualValue[7] unsignedCharValue], 2); + XCTAssertEqual([actualValue[8] unsignedCharValue], 1); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000131_TestListInt8UReverseRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Send Test Command With empty List of INT8U and get an empty list back"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * payload = [[CHIPTestClusterClusterTestListInt8UReverseRequestPayload alloc] init]; + { + NSMutableArray * temp = [[NSMutableArray alloc] init]; + payload.Arg1 = temp; + } + [cluster testListInt8UReverseRequest:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command With empty List of INT8U and get an empty list back Error: %@", err); + + XCTAssertEqual(err.code, 0); + + { + id actualValue = values[@"Arg1"]; + XCTAssertEqual([actualValue count], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000132_TestListStructArgumentRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Send Test Command With List of Struct Argument and arg1.b of first item is true"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * payload = [[CHIPTestClusterClusterTestListStructArgumentRequestPayload alloc] init]; + { + NSMutableArray * temp = [[NSMutableArray alloc] init]; + temp[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).A = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).B = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).C = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).D = [[NSData alloc] initWithBytes:"first_octet_string" length:18]; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).E = @"first_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).F = [NSNumber numberWithUnsignedChar:1]; + + temp[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).A = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).B = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).C = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).D = [[NSData alloc] initWithBytes:"second_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).E = @"second_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).F = [NSNumber numberWithUnsignedChar:1]; + + payload.Arg1 = temp; + } + [cluster + testListStructArgumentRequest:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command With List of Struct Argument and arg1.b of first item is true Error: %@", err); + + XCTAssertEqual(err.code, 0); + + { + id actualValue = values[@"Value"]; + XCTAssertEqual([actualValue boolValue], true); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000133_TestListStructArgumentRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Send Test Command With List of Struct Argument and arg1.b of first item is false"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * payload = [[CHIPTestClusterClusterTestListStructArgumentRequestPayload alloc] init]; + { + NSMutableArray * temp = [[NSMutableArray alloc] init]; + temp[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).A = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).B = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).C = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).D = [[NSData alloc] initWithBytes:"second_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).E = @"second_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp[0]).F = [NSNumber numberWithUnsignedChar:1]; + + temp[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).A = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).B = [NSNumber numberWithBool:false]; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).C = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).D = [[NSData alloc] initWithBytes:"first_octet_string" length:18]; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).E = @"first_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp[1]).F = [NSNumber numberWithUnsignedChar:1]; + + payload.Arg1 = temp; + } + [cluster + testListStructArgumentRequest:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command With List of Struct Argument and arg1.b of first item is false Error: %@", err); + + XCTAssertEqual(err.code, 0); + + { + id actualValue = values[@"Value"]; + XCTAssertEqual([actualValue boolValue], false); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000134_TestNullableOptionalRequest +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command with optional arg set."]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * payload = [[CHIPTestClusterClusterTestNullableOptionalRequestPayload alloc] init]; + payload.Arg1 = [NSNumber numberWithUnsignedChar:5]; + [cluster testNullableOptionalRequest:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command with optional arg set. Error: %@", err); + + XCTAssertEqual(err.code, 0); + + { + id actualValue = values[@"WasPresent"]; + XCTAssertEqual([actualValue boolValue], true); + } + { + id actualValue = values[@"WasNull"]; + XCTAssertEqual([actualValue boolValue], false); + } + { + id actualValue = values[@"Value"]; + XCTAssertEqual([actualValue unsignedCharValue], 5); + } + { + id actualValue = values[@"OriginalValue"]; + XCTAssertFalse([actualValue isKindOfClass:[NSNull class]]); + XCTAssertEqual([actualValue unsignedCharValue], 5); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000135_TestNullableOptionalRequest +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command without its optional arg."]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * payload = [[CHIPTestClusterClusterTestNullableOptionalRequestPayload alloc] init]; + [cluster testNullableOptionalRequest:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Send Test Command without its optional arg. Error: %@", err); + + XCTAssertEqual(err.code, 0); + + { + id actualValue = values[@"WasPresent"]; + XCTAssertEqual([actualValue boolValue], false); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTestConstraints_000000_WriteAttribute { @@ -17887,7 +19238,7 @@ - (void)testSendClusterTestConstraints_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertGreaterThanOrEqual([values[@"value"] unsignedLongValue], 5); + XCTAssertGreaterThanOrEqual([values[@"value"] unsignedIntValue], 5); [expectation fulfill]; }]; @@ -17908,7 +19259,7 @@ - (void)testSendClusterTestConstraints_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertLessThanOrEqual([values[@"value"] unsignedLongValue], 5); + XCTAssertLessThanOrEqual([values[@"value"] unsignedIntValue], 5); [expectation fulfill]; }]; @@ -17929,7 +19280,7 @@ - (void)testSendClusterTestConstraints_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertNotEqual([values[@"value"] unsignedLongValue], 6); + XCTAssertNotEqual([values[@"value"] unsignedIntValue], 6); [expectation fulfill]; }]; @@ -17960,7 +19311,20 @@ - (void)testSendClusterTestDescriptorCluster_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] count], 1); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue count], 1); + if ([actualValue[0] isKindOfClass:[NSDictionary class]]) { + XCTAssertEqual([actualValue[0][@"Type"] unsignedIntValue], 0UL); + } else { + XCTAssertEqual([[actualValue[0] Type] unsignedIntValue], 0UL); + } + if ([actualValue[0] isKindOfClass:[NSDictionary class]]) { + XCTAssertEqual([actualValue[0][@"Revision"] unsignedShortValue], 1U); + } else { + XCTAssertEqual([[actualValue[0] Revision] unsignedShortValue], 1U); + } + } [expectation fulfill]; }]; @@ -17981,7 +19345,28 @@ - (void)testSendClusterTestDescriptorCluster_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] count], 18); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue count], 18); + XCTAssertEqual([actualValue[0] unsignedIntValue], 3UL); + XCTAssertEqual([actualValue[1] unsignedIntValue], 29UL); + XCTAssertEqual([actualValue[2] unsignedIntValue], 40UL); + XCTAssertEqual([actualValue[3] unsignedIntValue], 41UL); + XCTAssertEqual([actualValue[4] unsignedIntValue], 42UL); + XCTAssertEqual([actualValue[5] unsignedIntValue], 48UL); + XCTAssertEqual([actualValue[6] unsignedIntValue], 49UL); + XCTAssertEqual([actualValue[7] unsignedIntValue], 50UL); + XCTAssertEqual([actualValue[8] unsignedIntValue], 51UL); + XCTAssertEqual([actualValue[9] unsignedIntValue], 52UL); + XCTAssertEqual([actualValue[10] unsignedIntValue], 53UL); + XCTAssertEqual([actualValue[11] unsignedIntValue], 54UL); + XCTAssertEqual([actualValue[12] unsignedIntValue], 55UL); + XCTAssertEqual([actualValue[13] unsignedIntValue], 60UL); + XCTAssertEqual([actualValue[14] unsignedIntValue], 62UL); + XCTAssertEqual([actualValue[15] unsignedIntValue], 1029UL); + XCTAssertEqual([actualValue[16] unsignedIntValue], 61440UL); + XCTAssertEqual([actualValue[17] unsignedIntValue], 61444UL); + } [expectation fulfill]; }]; @@ -18002,7 +19387,10 @@ - (void)testSendClusterTestDescriptorCluster_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] count], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue count], 0); + } [expectation fulfill]; }]; @@ -18023,7 +19411,12 @@ - (void)testSendClusterTestDescriptorCluster_000003_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] count], 2); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue count], 2); + XCTAssertEqual([actualValue[0] unsignedShortValue], 1U); + XCTAssertEqual([actualValue[1] unsignedShortValue], 2U); + } [expectation fulfill]; }]; @@ -18045,8 +19438,10 @@ - (void)testSendClusterTestBasicInformation_000000_ReadAttribute XCTAssertEqual(err.code, 0); - NSString * locationArgument = @""; - XCTAssertTrue([values[@"value"] isEqualToString:locationArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue isEqualToString:@""]); + } [expectation fulfill]; }]; @@ -18088,8 +19483,10 @@ - (void)testSendClusterTestBasicInformation_000002_ReadAttribute XCTAssertEqual(err.code, 0); - NSString * locationArgument = @"us"; - XCTAssertTrue([values[@"value"] isEqualToString:locationArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue isEqualToString:@"us"]); + } [expectation fulfill]; }]; @@ -18127,8 +19524,9 @@ - (void)testSendClusterTestIdentifyCluster_000000_Identify CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - uint16_t identifyTimeArgument = 0U; - [cluster identify:identifyTimeArgument + __auto_type * payload = [[CHIPIdentifyClusterIdentifyPayload alloc] init]; + payload.IdentifyTime = [NSNumber numberWithUnsignedShort:0]; + [cluster identify:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Send Identify command and expect success response Error: %@", err); @@ -18224,7 +19622,10 @@ - (void)testSendClusterTestModeSelectCluster_000000_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -18245,7 +19646,10 @@ - (void)testSendClusterTestModeSelectCluster_000001_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -18266,7 +19670,10 @@ - (void)testSendClusterTestModeSelectCluster_000002_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } [expectation fulfill]; }]; @@ -18287,8 +19694,10 @@ - (void)testSendClusterTestModeSelectCluster_000003_ReadAttribute XCTAssertEqual(err.code, 0); - NSString * descriptionArgument = @"Coffee"; - XCTAssertTrue([values[@"value"] isEqualToString:descriptionArgument]); + { + id actualValue = values[@"value"]; + XCTAssertTrue([actualValue isEqualToString:@"Coffee"]); + } [expectation fulfill]; }]; @@ -18309,7 +19718,55 @@ - (void)testSendClusterTestModeSelectCluster_000004_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] count], 3); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue count], 3); + if ([actualValue[0] isKindOfClass:[NSDictionary class]]) { + XCTAssertTrue([actualValue[0][@"Label"] isEqualToString:@"Black"]); + } else { + XCTAssertTrue([[actualValue[0] Label] isEqualToString:@"Black"]); + } + if ([actualValue[0] isKindOfClass:[NSDictionary class]]) { + XCTAssertEqual([actualValue[0][@"Mode"] unsignedCharValue], 0); + } else { + XCTAssertEqual([[actualValue[0] Mode] unsignedCharValue], 0); + } + if ([actualValue[0] isKindOfClass:[NSDictionary class]]) { + XCTAssertEqual([actualValue[0][@"SemanticTag"] unsignedIntValue], 0UL); + } else { + XCTAssertEqual([[actualValue[0] SemanticTag] unsignedIntValue], 0UL); + } + if ([actualValue[1] isKindOfClass:[NSDictionary class]]) { + XCTAssertTrue([actualValue[1][@"Label"] isEqualToString:@"Cappuccino"]); + } else { + XCTAssertTrue([[actualValue[1] Label] isEqualToString:@"Cappuccino"]); + } + if ([actualValue[1] isKindOfClass:[NSDictionary class]]) { + XCTAssertEqual([actualValue[1][@"Mode"] unsignedCharValue], 4); + } else { + XCTAssertEqual([[actualValue[1] Mode] unsignedCharValue], 4); + } + if ([actualValue[1] isKindOfClass:[NSDictionary class]]) { + XCTAssertEqual([actualValue[1][@"SemanticTag"] unsignedIntValue], 0UL); + } else { + XCTAssertEqual([[actualValue[1] SemanticTag] unsignedIntValue], 0UL); + } + if ([actualValue[2] isKindOfClass:[NSDictionary class]]) { + XCTAssertTrue([actualValue[2][@"Label"] isEqualToString:@"Espresso"]); + } else { + XCTAssertTrue([[actualValue[2] Label] isEqualToString:@"Espresso"]); + } + if ([actualValue[2] isKindOfClass:[NSDictionary class]]) { + XCTAssertEqual([actualValue[2][@"Mode"] unsignedCharValue], 7); + } else { + XCTAssertEqual([[actualValue[2] Mode] unsignedCharValue], 7); + } + if ([actualValue[2] isKindOfClass:[NSDictionary class]]) { + XCTAssertEqual([actualValue[2][@"SemanticTag"] unsignedIntValue], 0UL); + } else { + XCTAssertEqual([[actualValue[2] SemanticTag] unsignedIntValue], 0UL); + } + } [expectation fulfill]; }]; @@ -18325,8 +19782,9 @@ - (void)testSendClusterTestModeSelectCluster_000005_ChangeToMode CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t newModeArgument = 4; - [cluster changeToMode:newModeArgument + __auto_type * payload = [[CHIPModeSelectClusterChangeToModePayload alloc] init]; + payload.NewMode = [NSNumber numberWithUnsignedChar:4]; + [cluster changeToMode:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Change to Supported Mode Error: %@", err); @@ -18351,7 +19809,10 @@ - (void)testSendClusterTestModeSelectCluster_000006_ReadAttribute XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 4); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue unsignedCharValue], 4); + } [expectation fulfill]; }]; @@ -18367,8 +19828,9 @@ - (void)testSendClusterTestModeSelectCluster_000007_ChangeToMode CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t newModeArgument = 2; - [cluster changeToMode:newModeArgument + __auto_type * payload = [[CHIPModeSelectClusterChangeToModePayload alloc] init]; + payload.NewMode = [NSNumber numberWithUnsignedChar:2]; + [cluster changeToMode:payload responseHandler:^(NSError * err, NSDictionary * values) { NSLog(@"Change to Unsupported Mode Error: %@", err); @@ -18464,13 +19926,15 @@ - (void)testSendClusterTestSubscribe_OnOff_000000_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Set OnOff Attribute to false Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Set OnOff Attribute to false Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -18488,7 +19952,10 @@ - (void)testSendClusterTestSubscribe_OnOff_000001_WaitForReport XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], false); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], false); + } testSendClusterTestSubscribe_OnOff_000001_WaitForReport_Fulfilled = true; }]; @@ -18525,13 +19992,15 @@ - (void)testSendClusterTestSubscribe_OnOff_000003_On CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn On the light to see attribute change Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOnPayload alloc] init]; + [cluster on:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn On the light to see attribute change Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -18549,7 +20018,10 @@ - (void)testSendClusterTestSubscribe_OnOff_000004_WaitForReport XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], true); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], true); + } [expectation fulfill]; }]; @@ -18565,13 +20037,15 @@ - (void)testSendClusterTestSubscribe_OnOff_000005_Off CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn Off the light to see attribute change Error: %@", err); + __auto_type * payload = [[CHIPOnOffClusterOffPayload alloc] init]; + [cluster off:payload + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn Off the light to see attribute change Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -18589,7 +20063,10 @@ - (void)testSendClusterTestSubscribe_OnOff_000006_WaitForReport XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], false); + { + id actualValue = values[@"value"]; + XCTAssertEqual([actualValue boolValue], false); + } [expectation fulfill]; }]; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 2f8cfdc51b53eb..9797f58b4af36a 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -27663,6 +27663,51 @@ class TestCluster : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 125 : Send a command with a vendor_id and enum\n"); err = TestSendACommandWithAVendorIdAndEnum_125(); break; + case 126: + ChipLogProgress(chipTool, " ***** Test Step 126 : Send Test Command With Struct Argument and arg1.b is true\n"); + err = TestSendTestCommandWithStructArgumentAndArg1bIsTrue_126(); + break; + case 127: + ChipLogProgress(chipTool, " ***** Test Step 127 : Send Test Command With Struct Argument and arg1.b is false\n"); + err = TestSendTestCommandWithStructArgumentAndArg1bIsFalse_127(); + break; + case 128: + ChipLogProgress(chipTool, " ***** Test Step 128 : Send Test Command With List of INT8U and none of them is set to 0\n"); + err = TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_128(); + break; + case 129: + ChipLogProgress(chipTool, " ***** Test Step 129 : Send Test Command With List of INT8U and one of them is set to 0\n"); + err = TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_129(); + break; + case 130: + ChipLogProgress(chipTool, " ***** Test Step 130 : Send Test Command With List of INT8U and get it reversed\n"); + err = TestSendTestCommandWithListOfInt8uAndGetItReversed_130(); + break; + case 131: + ChipLogProgress(chipTool, + " ***** Test Step 131 : Send Test Command With empty List of INT8U and get an empty list back\n"); + err = TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_131(); + break; + case 132: + ChipLogProgress( + chipTool, + " ***** Test Step 132 : Send Test Command With List of Struct Argument and arg1.b of first item is true\n"); + err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_132(); + break; + case 133: + ChipLogProgress( + chipTool, + " ***** Test Step 133 : Send Test Command With List of Struct Argument and arg1.b of first item is false\n"); + err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_133(); + break; + case 134: + ChipLogProgress(chipTool, " ***** Test Step 134 : Send Test Command with optional arg set.\n"); + err = TestSendTestCommandWithOptionalArgSet_134(); + break; + case 135: + ChipLogProgress(chipTool, " ***** Test Step 135 : Send Test Command without its optional arg.\n"); + err = TestSendTestCommandWithoutItsOptionalArg_135(); + break; } if (CHIP_NO_ERROR != err) @@ -27674,7 +27719,7 @@ class TestCluster : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 126; + const uint16_t mTestCount = 136; static void OnFailureCallback_5(void * context, EmberAfStatus status) { @@ -31015,514 +31060,865 @@ class TestCluster : public TestCommand VerifyOrReturn(CheckValue("arg2", arg2, 101)); NextTest(); } -}; -class TestClusterComplexTypes : public TestCommand -{ -public: - TestClusterComplexTypes() : TestCommand("TestClusterComplexTypes"), mTestIndex(0) {} + CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_126() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; - /////////// TestCommand Interface ///////// - void NextTest() override + 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); + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_126(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_126(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_126(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_126(bool value) { - CHIP_ERROR err = CHIP_NO_ERROR; + VerifyOrReturn(CheckValue("value", value, true)); + NextTest(); + } - if (0 == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Start: TestClusterComplexTypes\n"); - } + CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_127() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; - if (mTestCount == mTestIndex) - { - ChipLogProgress(chipTool, " **** Test Complete: TestClusterComplexTypes\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + RequestType request; - Wait(); + 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); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) - { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Send Test Command With Struct Argument and arg1.b is true\n"); - err = TestSendTestCommandWithStructArgumentAndArg1bIsTrue_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Test Command With Struct Argument and arg1.b is false\n"); - err = TestSendTestCommandWithStructArgumentAndArg1bIsFalse_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Send Test Command With List of INT8U and none of them is set to 0\n"); - err = TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Send Test Command With List of INT8U and one of them is set to 0\n"); - err = TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Send Test Command With List of INT8U and get it reversed\n"); - err = TestSendTestCommandWithListOfInt8uAndGetItReversed_4(); - break; - case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Send Test Command With empty List of INT8U and get an empty list back\n"); - err = TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Send Test Command With List of Struct Argument and arg1.b of first item is true\n"); - err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_6(); - break; - case 7: - ChipLogProgress( - chipTool, - " ***** Test Step 7 : Send Test Command With List of Struct Argument and arg1.b of first item is false\n"); - err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Write attribute LIST With List of INT8U and none of them is set to 0\n"); - err = TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read attribute LIST With List of INT8U\n"); - err = TestReadAttributeListWithListOfInt8u_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Write attribute LIST With List of OCTET_STRING\n"); - err = TestWriteAttributeListWithListOfOctetString_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read attribute LIST With List of OCTET_STRING\n"); - err = TestReadAttributeListWithListOfOctetString_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Write attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); - err = TestWriteAttributeListWithListOfListStructOctetString_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); - err = TestReadAttributeListWithListOfListStructOctetString_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Send Test Command with optional arg set.\n"); - err = TestSendTestCommandWithOptionalArgSet_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Send Test Command without its optional arg.\n"); - err = TestSendTestCommandWithoutItsOptionalArg_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Send Test Command with optional arg set to null.\n"); - err = TestSendTestCommandWithOptionalArgSetToNull_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute NULLABLE_BOOLEAN null\n"); - err = TestWriteAttributeNullableBooleanNull_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute NULLABLE_BOOLEAN null\n"); - err = TestReadAttributeNullableBooleanNull_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Write attribute NULLABLE_BOOLEAN True\n"); - err = TestWriteAttributeNullableBooleanTrue_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read attribute NULLABLE_BOOLEAN True\n"); - err = TestReadAttributeNullableBooleanTrue_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Write attribute NULLABLE_BITMAP8 Max Value\n"); - err = TestWriteAttributeNullableBitmap8MaxValue_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Read attribute NULLABLE_BITMAP8 Max Value\n"); - err = TestReadAttributeNullableBitmap8MaxValue_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Write attribute NULLABLE_BITMAP8 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap8InvalidValue_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Read attribute NULLABLE_BITMAP8 unchanged Value\n"); - err = TestReadAttributeNullableBitmap8UnchangedValue_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Write attribute NULLABLE_BITMAP8 null Value\n"); - err = TestWriteAttributeNullableBitmap8NullValue_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read attribute NULLABLE_BITMAP8 null Value\n"); - err = TestReadAttributeNullableBitmap8NullValue_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Write attribute NULLABLE_BITMAP16 Max Value\n"); - err = TestWriteAttributeNullableBitmap16MaxValue_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read attribute NULLABLE_BITMAP16 Max Value\n"); - err = TestReadAttributeNullableBitmap16MaxValue_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Write attribute NULLABLE_BITMAP16 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap16InvalidValue_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Read attribute NULLABLE_BITMAP16 unchanged Value\n"); - err = TestReadAttributeNullableBitmap16UnchangedValue_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Write attribute NULLABLE_BITMAP16 null Value\n"); - err = TestWriteAttributeNullableBitmap16NullValue_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Read attribute NULLABLE_BITMAP16 null Value\n"); - err = TestReadAttributeNullableBitmap16NullValue_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Write attribute NULLABLE_BITMAP32 Max Value\n"); - err = TestWriteAttributeNullableBitmap32MaxValue_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read attribute NULLABLE_BITMAP32 Max Value\n"); - err = TestReadAttributeNullableBitmap32MaxValue_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Write attribute NULLABLE_BITMAP32 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap32InvalidValue_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read attribute NULLABLE_BITMAP32 unchanged Value\n"); - err = TestReadAttributeNullableBitmap32UnchangedValue_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Write attribute NULLABLE_BITMAP32 null Value\n"); - err = TestWriteAttributeNullableBitmap32NullValue_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Read attribute NULLABLE_BITMAP32 null Value\n"); - err = TestReadAttributeNullableBitmap32NullValue_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Write attribute NULLABLE_BITMAP64 Max Value\n"); - err = TestWriteAttributeNullableBitmap64MaxValue_39(); - break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Read attribute NULLABLE_BITMAP64 Max Value\n"); - err = TestReadAttributeNullableBitmap64MaxValue_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Write attribute NULLABLE_BITMAP64 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap64InvalidValue_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Read attribute NULLABLE_BITMAP64 unchanged Value\n"); - err = TestReadAttributeNullableBitmap64UnchangedValue_42(); - break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Write attribute NULLABLE_BITMAP64 null Value\n"); - err = TestWriteAttributeNullableBitmap64NullValue_43(); - break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Read attribute NULLABLE_BITMAP64 null Value\n"); - err = TestReadAttributeNullableBitmap64NullValue_44(); - break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Write attribute NULLABLE_INT8U Max Value\n"); - err = TestWriteAttributeNullableInt8uMaxValue_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Read attribute NULLABLE_INT8U Max Value\n"); - err = TestReadAttributeNullableInt8uMaxValue_46(); - break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Write attribute NULLABLE_INT8U Invalid Value\n"); - err = TestWriteAttributeNullableInt8uInvalidValue_47(); - break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Read attribute NULLABLE_INT8U unchanged Value\n"); - err = TestReadAttributeNullableInt8uUnchangedValue_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Write attribute NULLABLE_INT8U null Value\n"); - err = TestWriteAttributeNullableInt8uNullValue_49(); - break; - case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Read attribute NULLABLE_INT8U null Value\n"); - err = TestReadAttributeNullableInt8uNullValue_50(); - break; - case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Write attribute NULLABLE_INT16U Max Value\n"); - err = TestWriteAttributeNullableInt16uMaxValue_51(); - break; - case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Read attribute NULLABLE_INT16U Max Value\n"); - err = TestReadAttributeNullableInt16uMaxValue_52(); - break; - case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Write attribute NULLABLE_INT16U Invalid Value\n"); - err = TestWriteAttributeNullableInt16uInvalidValue_53(); - break; - case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : Read attribute NULLABLE_INT16U unchanged Value\n"); - err = TestReadAttributeNullableInt16uUnchangedValue_54(); - break; - case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : Write attribute NULLABLE_INT16U null Value\n"); - err = TestWriteAttributeNullableInt16uNullValue_55(); - break; - case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : Read attribute NULLABLE_INT16U null Value\n"); - err = TestReadAttributeNullableInt16uNullValue_56(); - break; - case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : Write attribute NULLABLE_INT32U Max Value\n"); - err = TestWriteAttributeNullableInt32uMaxValue_57(); - break; - case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Read attribute NULLABLE_INT32U Max Value\n"); - err = TestReadAttributeNullableInt32uMaxValue_58(); - break; - case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Write attribute NULLABLE_INT32U Invalid Value\n"); - err = TestWriteAttributeNullableInt32uInvalidValue_59(); - break; - case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : Read attribute NULLABLE_INT32U unchanged Value\n"); - err = TestReadAttributeNullableInt32uUnchangedValue_60(); - break; - case 61: - ChipLogProgress(chipTool, " ***** Test Step 61 : Write attribute NULLABLE_INT32U null Value\n"); - err = TestWriteAttributeNullableInt32uNullValue_61(); - break; - case 62: - ChipLogProgress(chipTool, " ***** Test Step 62 : Read attribute NULLABLE_INT32U null Value\n"); - err = TestReadAttributeNullableInt32uNullValue_62(); - break; - case 63: - ChipLogProgress(chipTool, " ***** Test Step 63 : Write attribute NULLABLE_INT64U Max Value\n"); - err = TestWriteAttributeNullableInt64uMaxValue_63(); - break; - case 64: - ChipLogProgress(chipTool, " ***** Test Step 64 : Read attribute NULLABLE_INT64U Max Value\n"); - err = TestReadAttributeNullableInt64uMaxValue_64(); - break; - case 65: - ChipLogProgress(chipTool, " ***** Test Step 65 : Write attribute NULLABLE_INT64U Invalid Value\n"); - err = TestWriteAttributeNullableInt64uInvalidValue_65(); - break; - case 66: - ChipLogProgress(chipTool, " ***** Test Step 66 : Read attribute NULLABLE_INT64U unchanged Value\n"); - err = TestReadAttributeNullableInt64uUnchangedValue_66(); - break; - case 67: - ChipLogProgress(chipTool, " ***** Test Step 67 : Write attribute NULLABLE_INT64U null Value\n"); - err = TestWriteAttributeNullableInt64uNullValue_67(); - break; - case 68: - ChipLogProgress(chipTool, " ***** Test Step 68 : Read attribute NULLABLE_INT64U null Value\n"); - err = TestReadAttributeNullableInt64uNullValue_68(); - break; - case 69: - ChipLogProgress(chipTool, " ***** Test Step 69 : Write attribute NULLABLE_INT8S Min Value\n"); - err = TestWriteAttributeNullableInt8sMinValue_69(); - break; - case 70: - ChipLogProgress(chipTool, " ***** Test Step 70 : Read attribute NULLABLE_INT8S Min Value\n"); - err = TestReadAttributeNullableInt8sMinValue_70(); - break; - case 71: - ChipLogProgress(chipTool, " ***** Test Step 71 : Write attribute NULLABLE_INT8S Invalid Value\n"); - err = TestWriteAttributeNullableInt8sInvalidValue_71(); - break; - case 72: - ChipLogProgress(chipTool, " ***** Test Step 72 : Read attribute NULLABLE_INT8S unchanged Value\n"); - err = TestReadAttributeNullableInt8sUnchangedValue_72(); - break; - case 73: - ChipLogProgress(chipTool, " ***** Test Step 73 : Write attribute NULLABLE_INT8S null Value\n"); - err = TestWriteAttributeNullableInt8sNullValue_73(); - break; - case 74: - ChipLogProgress(chipTool, " ***** Test Step 74 : Read attribute NULLABLE_INT8S null Value\n"); - err = TestReadAttributeNullableInt8sNullValue_74(); - break; - case 75: - ChipLogProgress(chipTool, " ***** Test Step 75 : Write attribute NULLABLE_INT16S Min Value\n"); - err = TestWriteAttributeNullableInt16sMinValue_75(); - break; - case 76: - ChipLogProgress(chipTool, " ***** Test Step 76 : Read attribute NULLABLE_INT16S Min Value\n"); - err = TestReadAttributeNullableInt16sMinValue_76(); - break; - case 77: - ChipLogProgress(chipTool, " ***** Test Step 77 : Write attribute NULLABLE_INT16S Invalid Value\n"); - err = TestWriteAttributeNullableInt16sInvalidValue_77(); - break; - case 78: - ChipLogProgress(chipTool, " ***** Test Step 78 : Read attribute NULLABLE_INT16S unchanged Value\n"); - err = TestReadAttributeNullableInt16sUnchangedValue_78(); - break; - case 79: - ChipLogProgress(chipTool, " ***** Test Step 79 : Write attribute NULLABLE_INT16S null Value\n"); - err = TestWriteAttributeNullableInt16sNullValue_79(); - break; - case 80: - ChipLogProgress(chipTool, " ***** Test Step 80 : Read attribute NULLABLE_INT16S null Value\n"); - err = TestReadAttributeNullableInt16sNullValue_80(); - break; - case 81: - ChipLogProgress(chipTool, " ***** Test Step 81 : Write attribute NULLABLE_INT32S Min Value\n"); - err = TestWriteAttributeNullableInt32sMinValue_81(); - break; + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_127(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_127(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_127(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_127(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_128() + { + 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_128(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_128(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_128(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_128(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_129() + { + 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_129(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_129(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_129(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_129(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_130() + { + 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_130(data.arg1); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_130(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_130(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_130(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_131() + { + 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_131(data.arg1); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_131(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_131(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_131(const chip::app::DataModel::DecodableList & arg1) + { + auto iter = arg1.begin(); + VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 0)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_132() + { + 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[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); + + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_132(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_132(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_132(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_132(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_133() + { + 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[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); + + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_133(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_133(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_133(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_133(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithOptionalArgSet_134() + { + 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_134(data.wasPresent, data.wasNull, data.value, data.originalValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_134(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_134(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_134(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_135() + { + 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_135(data.wasPresent, data.wasNull, data.value, data.originalValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_135(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_135(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_135(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + const chip::Optional> & originalValue) + { + VerifyOrReturn(CheckValue("wasPresent", wasPresent, false)); + + NextTest(); + } +}; + +class TestClusterComplexTypes : public TestCommand +{ +public: + TestClusterComplexTypes() : TestCommand("TestClusterComplexTypes"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: TestClusterComplexTypes\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: TestClusterComplexTypes\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Send Test Command with optional arg set to null.\n"); + err = TestSendTestCommandWithOptionalArgSetToNull_0(); + break; + case 1: + ChipLogProgress(chipTool, + " ***** Test Step 1 : Write attribute LIST With List of INT8U and none of them is set to 0\n"); + err = TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute LIST With List of INT8U\n"); + err = TestReadAttributeListWithListOfInt8u_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Write attribute LIST With List of OCTET_STRING\n"); + err = TestWriteAttributeListWithListOfOctetString_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute LIST With List of OCTET_STRING\n"); + err = TestReadAttributeListWithListOfOctetString_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Write attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); + err = TestWriteAttributeListWithListOfListStructOctetString_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); + err = TestReadAttributeListWithListOfListStructOctetString_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Write attribute NULLABLE_BOOLEAN null\n"); + err = TestWriteAttributeNullableBooleanNull_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute NULLABLE_BOOLEAN null\n"); + err = TestReadAttributeNullableBooleanNull_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Write attribute NULLABLE_BOOLEAN True\n"); + err = TestWriteAttributeNullableBooleanTrue_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read attribute NULLABLE_BOOLEAN True\n"); + err = TestReadAttributeNullableBooleanTrue_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Write attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestWriteAttributeNullableBitmap8MaxValue_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestReadAttributeNullableBitmap8MaxValue_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Write attribute NULLABLE_BITMAP8 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap8InvalidValue_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read attribute NULLABLE_BITMAP8 unchanged Value\n"); + err = TestReadAttributeNullableBitmap8UnchangedValue_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Write attribute NULLABLE_BITMAP8 null Value\n"); + err = TestWriteAttributeNullableBitmap8NullValue_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read attribute NULLABLE_BITMAP8 null Value\n"); + err = TestReadAttributeNullableBitmap8NullValue_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestWriteAttributeNullableBitmap16MaxValue_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestReadAttributeNullableBitmap16MaxValue_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Write attribute NULLABLE_BITMAP16 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap16InvalidValue_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read attribute NULLABLE_BITMAP16 unchanged Value\n"); + err = TestReadAttributeNullableBitmap16UnchangedValue_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Write attribute NULLABLE_BITMAP16 null Value\n"); + err = TestWriteAttributeNullableBitmap16NullValue_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Read attribute NULLABLE_BITMAP16 null Value\n"); + err = TestReadAttributeNullableBitmap16NullValue_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Write attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestWriteAttributeNullableBitmap32MaxValue_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Read attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestReadAttributeNullableBitmap32MaxValue_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Write attribute NULLABLE_BITMAP32 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap32InvalidValue_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Read attribute NULLABLE_BITMAP32 unchanged Value\n"); + err = TestReadAttributeNullableBitmap32UnchangedValue_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Write attribute NULLABLE_BITMAP32 null Value\n"); + err = TestWriteAttributeNullableBitmap32NullValue_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Read attribute NULLABLE_BITMAP32 null Value\n"); + err = TestReadAttributeNullableBitmap32NullValue_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Write attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestWriteAttributeNullableBitmap64MaxValue_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Read attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestReadAttributeNullableBitmap64MaxValue_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Write attribute NULLABLE_BITMAP64 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap64InvalidValue_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Read attribute NULLABLE_BITMAP64 unchanged Value\n"); + err = TestReadAttributeNullableBitmap64UnchangedValue_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Write attribute NULLABLE_BITMAP64 null Value\n"); + err = TestWriteAttributeNullableBitmap64NullValue_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Read attribute NULLABLE_BITMAP64 null Value\n"); + err = TestReadAttributeNullableBitmap64NullValue_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Write attribute NULLABLE_INT8U Max Value\n"); + err = TestWriteAttributeNullableInt8uMaxValue_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Read attribute NULLABLE_INT8U Max Value\n"); + err = TestReadAttributeNullableInt8uMaxValue_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Write attribute NULLABLE_INT8U Invalid Value\n"); + err = TestWriteAttributeNullableInt8uInvalidValue_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Read attribute NULLABLE_INT8U unchanged Value\n"); + err = TestReadAttributeNullableInt8uUnchangedValue_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Write attribute NULLABLE_INT8U null Value\n"); + err = TestWriteAttributeNullableInt8uNullValue_39(); + break; + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : Read attribute NULLABLE_INT8U null Value\n"); + err = TestReadAttributeNullableInt8uNullValue_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : Write attribute NULLABLE_INT16U Max Value\n"); + err = TestWriteAttributeNullableInt16uMaxValue_41(); + break; + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : Read attribute NULLABLE_INT16U Max Value\n"); + err = TestReadAttributeNullableInt16uMaxValue_42(); + break; + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : Write attribute NULLABLE_INT16U Invalid Value\n"); + err = TestWriteAttributeNullableInt16uInvalidValue_43(); + break; + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : Read attribute NULLABLE_INT16U unchanged Value\n"); + err = TestReadAttributeNullableInt16uUnchangedValue_44(); + break; + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : Write attribute NULLABLE_INT16U null Value\n"); + err = TestWriteAttributeNullableInt16uNullValue_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : Read attribute NULLABLE_INT16U null Value\n"); + err = TestReadAttributeNullableInt16uNullValue_46(); + break; + case 47: + ChipLogProgress(chipTool, " ***** Test Step 47 : Write attribute NULLABLE_INT32U Max Value\n"); + err = TestWriteAttributeNullableInt32uMaxValue_47(); + break; + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : Read attribute NULLABLE_INT32U Max Value\n"); + err = TestReadAttributeNullableInt32uMaxValue_48(); + break; + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : Write attribute NULLABLE_INT32U Invalid Value\n"); + err = TestWriteAttributeNullableInt32uInvalidValue_49(); + break; + case 50: + ChipLogProgress(chipTool, " ***** Test Step 50 : Read attribute NULLABLE_INT32U unchanged Value\n"); + err = TestReadAttributeNullableInt32uUnchangedValue_50(); + break; + case 51: + ChipLogProgress(chipTool, " ***** Test Step 51 : Write attribute NULLABLE_INT32U null Value\n"); + err = TestWriteAttributeNullableInt32uNullValue_51(); + break; + case 52: + ChipLogProgress(chipTool, " ***** Test Step 52 : Read attribute NULLABLE_INT32U null Value\n"); + err = TestReadAttributeNullableInt32uNullValue_52(); + break; + case 53: + ChipLogProgress(chipTool, " ***** Test Step 53 : Write attribute NULLABLE_INT64U Max Value\n"); + err = TestWriteAttributeNullableInt64uMaxValue_53(); + break; + case 54: + ChipLogProgress(chipTool, " ***** Test Step 54 : Read attribute NULLABLE_INT64U Max Value\n"); + err = TestReadAttributeNullableInt64uMaxValue_54(); + break; + case 55: + ChipLogProgress(chipTool, " ***** Test Step 55 : Write attribute NULLABLE_INT64U Invalid Value\n"); + err = TestWriteAttributeNullableInt64uInvalidValue_55(); + break; + case 56: + ChipLogProgress(chipTool, " ***** Test Step 56 : Read attribute NULLABLE_INT64U unchanged Value\n"); + err = TestReadAttributeNullableInt64uUnchangedValue_56(); + break; + case 57: + ChipLogProgress(chipTool, " ***** Test Step 57 : Write attribute NULLABLE_INT64U null Value\n"); + err = TestWriteAttributeNullableInt64uNullValue_57(); + break; + case 58: + ChipLogProgress(chipTool, " ***** Test Step 58 : Read attribute NULLABLE_INT64U null Value\n"); + err = TestReadAttributeNullableInt64uNullValue_58(); + break; + case 59: + ChipLogProgress(chipTool, " ***** Test Step 59 : Write attribute NULLABLE_INT8S Min Value\n"); + err = TestWriteAttributeNullableInt8sMinValue_59(); + break; + case 60: + ChipLogProgress(chipTool, " ***** Test Step 60 : Read attribute NULLABLE_INT8S Min Value\n"); + err = TestReadAttributeNullableInt8sMinValue_60(); + break; + case 61: + ChipLogProgress(chipTool, " ***** Test Step 61 : Write attribute NULLABLE_INT8S Invalid Value\n"); + err = TestWriteAttributeNullableInt8sInvalidValue_61(); + break; + case 62: + ChipLogProgress(chipTool, " ***** Test Step 62 : Read attribute NULLABLE_INT8S unchanged Value\n"); + err = TestReadAttributeNullableInt8sUnchangedValue_62(); + break; + case 63: + ChipLogProgress(chipTool, " ***** Test Step 63 : Write attribute NULLABLE_INT8S null Value\n"); + err = TestWriteAttributeNullableInt8sNullValue_63(); + break; + case 64: + ChipLogProgress(chipTool, " ***** Test Step 64 : Read attribute NULLABLE_INT8S null Value\n"); + err = TestReadAttributeNullableInt8sNullValue_64(); + break; + case 65: + ChipLogProgress(chipTool, " ***** Test Step 65 : Write attribute NULLABLE_INT16S Min Value\n"); + err = TestWriteAttributeNullableInt16sMinValue_65(); + break; + case 66: + ChipLogProgress(chipTool, " ***** Test Step 66 : Read attribute NULLABLE_INT16S Min Value\n"); + err = TestReadAttributeNullableInt16sMinValue_66(); + break; + case 67: + ChipLogProgress(chipTool, " ***** Test Step 67 : Write attribute NULLABLE_INT16S Invalid Value\n"); + err = TestWriteAttributeNullableInt16sInvalidValue_67(); + break; + case 68: + ChipLogProgress(chipTool, " ***** Test Step 68 : Read attribute NULLABLE_INT16S unchanged Value\n"); + err = TestReadAttributeNullableInt16sUnchangedValue_68(); + break; + case 69: + ChipLogProgress(chipTool, " ***** Test Step 69 : Write attribute NULLABLE_INT16S null Value\n"); + err = TestWriteAttributeNullableInt16sNullValue_69(); + break; + case 70: + ChipLogProgress(chipTool, " ***** Test Step 70 : Read attribute NULLABLE_INT16S null Value\n"); + err = TestReadAttributeNullableInt16sNullValue_70(); + break; + case 71: + ChipLogProgress(chipTool, " ***** Test Step 71 : Write attribute NULLABLE_INT32S Min Value\n"); + err = TestWriteAttributeNullableInt32sMinValue_71(); + break; + case 72: + ChipLogProgress(chipTool, " ***** Test Step 72 : Read attribute NULLABLE_INT32S Min Value\n"); + err = TestReadAttributeNullableInt32sMinValue_72(); + break; + case 73: + ChipLogProgress(chipTool, " ***** Test Step 73 : Write attribute NULLABLE_INT32S Invalid Value\n"); + err = TestWriteAttributeNullableInt32sInvalidValue_73(); + break; + case 74: + ChipLogProgress(chipTool, " ***** Test Step 74 : Read attribute NULLABLE_INT32S unchanged Value\n"); + err = TestReadAttributeNullableInt32sUnchangedValue_74(); + break; + case 75: + ChipLogProgress(chipTool, " ***** Test Step 75 : Write attribute NULLABLE_INT32S null Value\n"); + err = TestWriteAttributeNullableInt32sNullValue_75(); + break; + case 76: + ChipLogProgress(chipTool, " ***** Test Step 76 : Read attribute NULLABLE_INT32S null Value\n"); + err = TestReadAttributeNullableInt32sNullValue_76(); + break; + case 77: + ChipLogProgress(chipTool, " ***** Test Step 77 : Write attribute NULLABLE_INT64S Min Value\n"); + err = TestWriteAttributeNullableInt64sMinValue_77(); + break; + case 78: + ChipLogProgress(chipTool, " ***** Test Step 78 : Read attribute NULLABLE_INT64S Min Value\n"); + err = TestReadAttributeNullableInt64sMinValue_78(); + break; + case 79: + ChipLogProgress(chipTool, " ***** Test Step 79 : Write attribute NULLABLE_INT64S Invalid Value\n"); + err = TestWriteAttributeNullableInt64sInvalidValue_79(); + break; + case 80: + ChipLogProgress(chipTool, " ***** Test Step 80 : Read attribute NULLABLE_INT64S unchanged Value\n"); + err = TestReadAttributeNullableInt64sUnchangedValue_80(); + break; + case 81: + ChipLogProgress(chipTool, " ***** Test Step 81 : Write attribute NULLABLE_INT64S null Value\n"); + err = TestWriteAttributeNullableInt64sNullValue_81(); + break; case 82: - ChipLogProgress(chipTool, " ***** Test Step 82 : Read attribute NULLABLE_INT32S Min Value\n"); - err = TestReadAttributeNullableInt32sMinValue_82(); + ChipLogProgress(chipTool, " ***** Test Step 82 : Read attribute NULLABLE_INT64S null Value\n"); + err = TestReadAttributeNullableInt64sNullValue_82(); break; case 83: - ChipLogProgress(chipTool, " ***** Test Step 83 : Write attribute NULLABLE_INT32S Invalid Value\n"); - err = TestWriteAttributeNullableInt32sInvalidValue_83(); + ChipLogProgress(chipTool, " ***** Test Step 83 : Write attribute NULLABLE_ENUM8 Max Value\n"); + err = TestWriteAttributeNullableEnum8MaxValue_83(); break; case 84: - ChipLogProgress(chipTool, " ***** Test Step 84 : Read attribute NULLABLE_INT32S unchanged Value\n"); - err = TestReadAttributeNullableInt32sUnchangedValue_84(); + ChipLogProgress(chipTool, " ***** Test Step 84 : Read attribute NULLABLE_ENUM8 Max Value\n"); + err = TestReadAttributeNullableEnum8MaxValue_84(); break; case 85: - ChipLogProgress(chipTool, " ***** Test Step 85 : Write attribute NULLABLE_INT32S null Value\n"); - err = TestWriteAttributeNullableInt32sNullValue_85(); + ChipLogProgress(chipTool, " ***** Test Step 85 : Write attribute NULLABLE_ENUM8 Invalid Value\n"); + err = TestWriteAttributeNullableEnum8InvalidValue_85(); break; case 86: - ChipLogProgress(chipTool, " ***** Test Step 86 : Read attribute NULLABLE_INT32S null Value\n"); - err = TestReadAttributeNullableInt32sNullValue_86(); + ChipLogProgress(chipTool, " ***** Test Step 86 : Read attribute NULLABLE_ENUM8 unchanged Value\n"); + err = TestReadAttributeNullableEnum8UnchangedValue_86(); break; case 87: - ChipLogProgress(chipTool, " ***** Test Step 87 : Write attribute NULLABLE_INT64S Min Value\n"); - err = TestWriteAttributeNullableInt64sMinValue_87(); + ChipLogProgress(chipTool, " ***** Test Step 87 : Write attribute NULLABLE_ENUM8 null Value\n"); + err = TestWriteAttributeNullableEnum8NullValue_87(); break; case 88: - ChipLogProgress(chipTool, " ***** Test Step 88 : Read attribute NULLABLE_INT64S Min Value\n"); - err = TestReadAttributeNullableInt64sMinValue_88(); + ChipLogProgress(chipTool, " ***** Test Step 88 : Read attribute NULLABLE_ENUM8 null Value\n"); + err = TestReadAttributeNullableEnum8NullValue_88(); break; case 89: - ChipLogProgress(chipTool, " ***** Test Step 89 : Write attribute NULLABLE_INT64S Invalid Value\n"); - err = TestWriteAttributeNullableInt64sInvalidValue_89(); + ChipLogProgress(chipTool, " ***** Test Step 89 : Write attribute NULLABLE_ENUM16 Max Value\n"); + err = TestWriteAttributeNullableEnum16MaxValue_89(); break; case 90: - ChipLogProgress(chipTool, " ***** Test Step 90 : Read attribute NULLABLE_INT64S unchanged Value\n"); - err = TestReadAttributeNullableInt64sUnchangedValue_90(); + ChipLogProgress(chipTool, " ***** Test Step 90 : Read attribute NULLABLE_ENUM16 Max Value\n"); + err = TestReadAttributeNullableEnum16MaxValue_90(); break; case 91: - ChipLogProgress(chipTool, " ***** Test Step 91 : Write attribute NULLABLE_INT64S null Value\n"); - err = TestWriteAttributeNullableInt64sNullValue_91(); + ChipLogProgress(chipTool, " ***** Test Step 91 : Write attribute NULLABLE_ENUM16 Invalid Value\n"); + err = TestWriteAttributeNullableEnum16InvalidValue_91(); break; case 92: - ChipLogProgress(chipTool, " ***** Test Step 92 : Read attribute NULLABLE_INT64S null Value\n"); - err = TestReadAttributeNullableInt64sNullValue_92(); + ChipLogProgress(chipTool, " ***** Test Step 92 : Read attribute NULLABLE_ENUM16 unchanged Value\n"); + err = TestReadAttributeNullableEnum16UnchangedValue_92(); break; case 93: - ChipLogProgress(chipTool, " ***** Test Step 93 : Write attribute NULLABLE_ENUM8 Max Value\n"); - err = TestWriteAttributeNullableEnum8MaxValue_93(); + ChipLogProgress(chipTool, " ***** Test Step 93 : Write attribute NULLABLE_ENUM16 null Value\n"); + err = TestWriteAttributeNullableEnum16NullValue_93(); break; case 94: - ChipLogProgress(chipTool, " ***** Test Step 94 : Read attribute NULLABLE_ENUM8 Max Value\n"); - err = TestReadAttributeNullableEnum8MaxValue_94(); + ChipLogProgress(chipTool, " ***** Test Step 94 : Read attribute NULLABLE_ENUM16 null Value\n"); + err = TestReadAttributeNullableEnum16NullValue_94(); break; case 95: - ChipLogProgress(chipTool, " ***** Test Step 95 : Write attribute NULLABLE_ENUM8 Invalid Value\n"); - err = TestWriteAttributeNullableEnum8InvalidValue_95(); + ChipLogProgress(chipTool, " ***** Test Step 95 : Read attribute NULLABLE_OCTET_STRING Default Value\n"); + err = TestReadAttributeNullableOctetStringDefaultValue_95(); break; case 96: - ChipLogProgress(chipTool, " ***** Test Step 96 : Read attribute NULLABLE_ENUM8 unchanged Value\n"); - err = TestReadAttributeNullableEnum8UnchangedValue_96(); + ChipLogProgress(chipTool, " ***** Test Step 96 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_96(); break; case 97: - ChipLogProgress(chipTool, " ***** Test Step 97 : Write attribute NULLABLE_ENUM8 null Value\n"); - err = TestWriteAttributeNullableEnum8NullValue_97(); + ChipLogProgress(chipTool, " ***** Test Step 97 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_97(); break; case 98: - ChipLogProgress(chipTool, " ***** Test Step 98 : Read attribute NULLABLE_ENUM8 null Value\n"); - err = TestReadAttributeNullableEnum8NullValue_98(); + ChipLogProgress(chipTool, " ***** Test Step 98 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_98(); break; case 99: - ChipLogProgress(chipTool, " ***** Test Step 99 : Write attribute NULLABLE_ENUM16 Max Value\n"); - err = TestWriteAttributeNullableEnum16MaxValue_99(); + ChipLogProgress(chipTool, " ***** Test Step 99 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_99(); break; case 100: - ChipLogProgress(chipTool, " ***** Test Step 100 : Read attribute NULLABLE_ENUM16 Max Value\n"); - err = TestReadAttributeNullableEnum16MaxValue_100(); + ChipLogProgress(chipTool, " ***** Test Step 100 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_100(); break; case 101: - ChipLogProgress(chipTool, " ***** Test Step 101 : Write attribute NULLABLE_ENUM16 Invalid Value\n"); - err = TestWriteAttributeNullableEnum16InvalidValue_101(); + ChipLogProgress(chipTool, " ***** Test Step 101 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_101(); break; case 102: - ChipLogProgress(chipTool, " ***** Test Step 102 : Read attribute NULLABLE_ENUM16 unchanged Value\n"); - err = TestReadAttributeNullableEnum16UnchangedValue_102(); + ChipLogProgress(chipTool, " ***** Test Step 102 : Read attribute NULLABLE_CHAR_STRING Default Value\n"); + err = TestReadAttributeNullableCharStringDefaultValue_102(); break; case 103: - ChipLogProgress(chipTool, " ***** Test Step 103 : Write attribute NULLABLE_ENUM16 null Value\n"); - err = TestWriteAttributeNullableEnum16NullValue_103(); + ChipLogProgress(chipTool, " ***** Test Step 103 : Write attribute NULLABLE_CHAR_STRING\n"); + err = TestWriteAttributeNullableCharString_103(); break; case 104: - ChipLogProgress(chipTool, " ***** Test Step 104 : Read attribute NULLABLE_ENUM16 null Value\n"); - err = TestReadAttributeNullableEnum16NullValue_104(); + ChipLogProgress(chipTool, " ***** Test Step 104 : Write attribute NULLABLE_CHAR_STRING - Value too long\n"); + err = TestWriteAttributeNullableCharStringValueTooLong_104(); break; case 105: - ChipLogProgress(chipTool, " ***** Test Step 105 : Read attribute NULLABLE_OCTET_STRING Default Value\n"); - err = TestReadAttributeNullableOctetStringDefaultValue_105(); + ChipLogProgress(chipTool, " ***** Test Step 105 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_105(); break; case 106: - ChipLogProgress(chipTool, " ***** Test Step 106 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_106(); + ChipLogProgress(chipTool, " ***** Test Step 106 : Write attribute NULLABLE_CHAR_STRING - Empty\n"); + err = TestWriteAttributeNullableCharStringEmpty_106(); break; case 107: - ChipLogProgress(chipTool, " ***** Test Step 107 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_107(); - break; - case 108: - ChipLogProgress(chipTool, " ***** Test Step 108 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_108(); - break; - case 109: - ChipLogProgress(chipTool, " ***** Test Step 109 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_109(); - break; - case 110: - ChipLogProgress(chipTool, " ***** Test Step 110 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_110(); - break; - case 111: - ChipLogProgress(chipTool, " ***** Test Step 111 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_111(); - break; - case 112: - ChipLogProgress(chipTool, " ***** Test Step 112 : Read attribute NULLABLE_CHAR_STRING Default Value\n"); - err = TestReadAttributeNullableCharStringDefaultValue_112(); - break; - case 113: - ChipLogProgress(chipTool, " ***** Test Step 113 : Write attribute NULLABLE_CHAR_STRING\n"); - err = TestWriteAttributeNullableCharString_113(); - break; - case 114: - ChipLogProgress(chipTool, " ***** Test Step 114 : Write attribute NULLABLE_CHAR_STRING - Value too long\n"); - err = TestWriteAttributeNullableCharStringValueTooLong_114(); - break; - case 115: - ChipLogProgress(chipTool, " ***** Test Step 115 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_115(); - break; - case 116: - ChipLogProgress(chipTool, " ***** Test Step 116 : Write attribute NULLABLE_CHAR_STRING - Empty\n"); - err = TestWriteAttributeNullableCharStringEmpty_116(); - break; - case 117: - ChipLogProgress(chipTool, " ***** Test Step 117 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_117(); + ChipLogProgress(chipTool, " ***** Test Step 107 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_107(); break; } @@ -31535,60 +31931,145 @@ class TestClusterComplexTypes : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 118; + const uint16_t mTestCount = 108; + + static void OnFailureCallback_1(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_1(chip::to_underlying(status)); + } + + static void OnSuccessCallback_1(void * context) { (static_cast(context))->OnSuccessResponse_1(); } + + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(chip::to_underlying(status)); + } + + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::DecodableList & listInt8u) + { + (static_cast(context))->OnSuccessResponse_2(listInt8u); + } + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(chip::to_underlying(status)); + } + + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(chip::to_underlying(status)); + } + + static void OnSuccessCallback_4(void * context, const chip::app::DataModel::DecodableList & listOctetString) + { + (static_cast(context))->OnSuccessResponse_4(listOctetString); + } + + static void OnFailureCallback_5(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_5(chip::to_underlying(status)); + } + + static void OnSuccessCallback_5(void * context) { (static_cast(context))->OnSuccessResponse_5(); } + + static void OnFailureCallback_6(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_6(chip::to_underlying(status)); + } + + static void OnSuccessCallback_6( + void * context, + const chip::app::DataModel::DecodableList & + listStructOctetString) + { + (static_cast(context))->OnSuccessResponse_6(listStructOctetString); + } + + static void OnFailureCallback_7(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_7(chip::to_underlying(status)); + } + + static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } static void OnFailureCallback_8(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(chip::to_underlying(status)); } - static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } + static void OnSuccessCallback_8(void * context, const chip::app::DataModel::Nullable & nullableBoolean) + { + (static_cast(context))->OnSuccessResponse_8(nullableBoolean); + } static void OnFailureCallback_9(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(chip::to_underlying(status)); } - static void OnSuccessCallback_9(void * context, const chip::app::DataModel::DecodableList & listInt8u) - { - (static_cast(context))->OnSuccessResponse_9(listInt8u); - } + static void OnSuccessCallback_9(void * context) { (static_cast(context))->OnSuccessResponse_9(); } static void OnFailureCallback_10(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(chip::to_underlying(status)); } - static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } + static void OnSuccessCallback_10(void * context, const chip::app::DataModel::Nullable & nullableBoolean) + { + (static_cast(context))->OnSuccessResponse_10(nullableBoolean); + } static void OnFailureCallback_11(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(chip::to_underlying(status)); } - static void OnSuccessCallback_11(void * context, const chip::app::DataModel::DecodableList & listOctetString) - { - (static_cast(context))->OnSuccessResponse_11(listOctetString); - } + static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } static void OnFailureCallback_12(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(chip::to_underlying(status)); } - static void OnSuccessCallback_12(void * context) { (static_cast(context))->OnSuccessResponse_12(); } + static void OnSuccessCallback_12(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + { + (static_cast(context))->OnSuccessResponse_12(nullableBitmap8); + } static void OnFailureCallback_13(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(chip::to_underlying(status)); } - static void OnSuccessCallback_13( - void * context, - const chip::app::DataModel::DecodableList & - listStructOctetString) + static void OnSuccessCallback_13(void * context) { (static_cast(context))->OnSuccessResponse_13(); } + + static void OnFailureCallback_14(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_14(chip::to_underlying(status)); + } + + static void OnSuccessCallback_14(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + { + (static_cast(context))->OnSuccessResponse_14(nullableBitmap8); + } + + static void OnFailureCallback_15(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_15(chip::to_underlying(status)); + } + + static void OnSuccessCallback_15(void * context) { (static_cast(context))->OnSuccessResponse_15(); } + + static void OnFailureCallback_16(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_16(chip::to_underlying(status)); + } + + static void OnSuccessCallback_16(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) { - (static_cast(context))->OnSuccessResponse_13(listStructOctetString); + (static_cast(context))->OnSuccessResponse_16(nullableBitmap8); } static void OnFailureCallback_17(void * context, EmberAfStatus status) @@ -31603,9 +32084,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_18(chip::to_underlying(status)); } - static void OnSuccessCallback_18(void * context, const chip::app::DataModel::Nullable & nullableBoolean) + static void OnSuccessCallback_18(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) { - (static_cast(context))->OnSuccessResponse_18(nullableBoolean); + (static_cast(context))->OnSuccessResponse_18(nullableBitmap16); } static void OnFailureCallback_19(void * context, EmberAfStatus status) @@ -31620,9 +32101,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_20(chip::to_underlying(status)); } - static void OnSuccessCallback_20(void * context, const chip::app::DataModel::Nullable & nullableBoolean) + static void OnSuccessCallback_20(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) { - (static_cast(context))->OnSuccessResponse_20(nullableBoolean); + (static_cast(context))->OnSuccessResponse_20(nullableBitmap16); } static void OnFailureCallback_21(void * context, EmberAfStatus status) @@ -31637,9 +32118,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_22(chip::to_underlying(status)); } - static void OnSuccessCallback_22(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_22(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) { - (static_cast(context))->OnSuccessResponse_22(nullableBitmap8); + (static_cast(context))->OnSuccessResponse_22(nullableBitmap16); } static void OnFailureCallback_23(void * context, EmberAfStatus status) @@ -31654,9 +32135,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_24(chip::to_underlying(status)); } - static void OnSuccessCallback_24(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_24(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) { - (static_cast(context))->OnSuccessResponse_24(nullableBitmap8); + (static_cast(context))->OnSuccessResponse_24(nullableBitmap32); } static void OnFailureCallback_25(void * context, EmberAfStatus status) @@ -31671,9 +32152,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_26(chip::to_underlying(status)); } - static void OnSuccessCallback_26(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_26(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) { - (static_cast(context))->OnSuccessResponse_26(nullableBitmap8); + (static_cast(context))->OnSuccessResponse_26(nullableBitmap32); } static void OnFailureCallback_27(void * context, EmberAfStatus status) @@ -31688,9 +32169,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_28(chip::to_underlying(status)); } - static void OnSuccessCallback_28(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_28(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) { - (static_cast(context))->OnSuccessResponse_28(nullableBitmap16); + (static_cast(context))->OnSuccessResponse_28(nullableBitmap32); } static void OnFailureCallback_29(void * context, EmberAfStatus status) @@ -31705,9 +32186,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_30(chip::to_underlying(status)); } - static void OnSuccessCallback_30(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_30(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) { - (static_cast(context))->OnSuccessResponse_30(nullableBitmap16); + (static_cast(context))->OnSuccessResponse_30(nullableBitmap64); } static void OnFailureCallback_31(void * context, EmberAfStatus status) @@ -31722,9 +32203,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_32(chip::to_underlying(status)); } - static void OnSuccessCallback_32(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_32(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) { - (static_cast(context))->OnSuccessResponse_32(nullableBitmap16); + (static_cast(context))->OnSuccessResponse_32(nullableBitmap64); } static void OnFailureCallback_33(void * context, EmberAfStatus status) @@ -31739,9 +32220,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_34(chip::to_underlying(status)); } - static void OnSuccessCallback_34(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_34(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) { - (static_cast(context))->OnSuccessResponse_34(nullableBitmap32); + (static_cast(context))->OnSuccessResponse_34(nullableBitmap64); } static void OnFailureCallback_35(void * context, EmberAfStatus status) @@ -31756,9 +32237,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_36(chip::to_underlying(status)); } - static void OnSuccessCallback_36(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_36(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { - (static_cast(context))->OnSuccessResponse_36(nullableBitmap32); + (static_cast(context))->OnSuccessResponse_36(nullableInt8u); } static void OnFailureCallback_37(void * context, EmberAfStatus status) @@ -31773,9 +32254,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_38(chip::to_underlying(status)); } - static void OnSuccessCallback_38(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_38(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { - (static_cast(context))->OnSuccessResponse_38(nullableBitmap32); + (static_cast(context))->OnSuccessResponse_38(nullableInt8u); } static void OnFailureCallback_39(void * context, EmberAfStatus status) @@ -31790,9 +32271,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_40(chip::to_underlying(status)); } - static void OnSuccessCallback_40(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_40(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { - (static_cast(context))->OnSuccessResponse_40(nullableBitmap64); + (static_cast(context))->OnSuccessResponse_40(nullableInt8u); } static void OnFailureCallback_41(void * context, EmberAfStatus status) @@ -31807,9 +32288,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_42(chip::to_underlying(status)); } - static void OnSuccessCallback_42(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_42(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { - (static_cast(context))->OnSuccessResponse_42(nullableBitmap64); + (static_cast(context))->OnSuccessResponse_42(nullableInt16u); } static void OnFailureCallback_43(void * context, EmberAfStatus status) @@ -31824,9 +32305,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_44(chip::to_underlying(status)); } - static void OnSuccessCallback_44(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_44(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { - (static_cast(context))->OnSuccessResponse_44(nullableBitmap64); + (static_cast(context))->OnSuccessResponse_44(nullableInt16u); } static void OnFailureCallback_45(void * context, EmberAfStatus status) @@ -31841,9 +32322,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_46(chip::to_underlying(status)); } - static void OnSuccessCallback_46(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_46(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { - (static_cast(context))->OnSuccessResponse_46(nullableInt8u); + (static_cast(context))->OnSuccessResponse_46(nullableInt16u); } static void OnFailureCallback_47(void * context, EmberAfStatus status) @@ -31858,9 +32339,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_48(chip::to_underlying(status)); } - static void OnSuccessCallback_48(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_48(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { - (static_cast(context))->OnSuccessResponse_48(nullableInt8u); + (static_cast(context))->OnSuccessResponse_48(nullableInt32u); } static void OnFailureCallback_49(void * context, EmberAfStatus status) @@ -31875,9 +32356,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_50(chip::to_underlying(status)); } - static void OnSuccessCallback_50(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_50(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { - (static_cast(context))->OnSuccessResponse_50(nullableInt8u); + (static_cast(context))->OnSuccessResponse_50(nullableInt32u); } static void OnFailureCallback_51(void * context, EmberAfStatus status) @@ -31892,9 +32373,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_52(chip::to_underlying(status)); } - static void OnSuccessCallback_52(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_52(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { - (static_cast(context))->OnSuccessResponse_52(nullableInt16u); + (static_cast(context))->OnSuccessResponse_52(nullableInt32u); } static void OnFailureCallback_53(void * context, EmberAfStatus status) @@ -31909,9 +32390,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_54(chip::to_underlying(status)); } - static void OnSuccessCallback_54(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_54(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { - (static_cast(context))->OnSuccessResponse_54(nullableInt16u); + (static_cast(context))->OnSuccessResponse_54(nullableInt64u); } static void OnFailureCallback_55(void * context, EmberAfStatus status) @@ -31926,9 +32407,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_56(chip::to_underlying(status)); } - static void OnSuccessCallback_56(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_56(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { - (static_cast(context))->OnSuccessResponse_56(nullableInt16u); + (static_cast(context))->OnSuccessResponse_56(nullableInt64u); } static void OnFailureCallback_57(void * context, EmberAfStatus status) @@ -31943,9 +32424,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_58(chip::to_underlying(status)); } - static void OnSuccessCallback_58(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_58(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { - (static_cast(context))->OnSuccessResponse_58(nullableInt32u); + (static_cast(context))->OnSuccessResponse_58(nullableInt64u); } static void OnFailureCallback_59(void * context, EmberAfStatus status) @@ -31960,9 +32441,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_60(chip::to_underlying(status)); } - static void OnSuccessCallback_60(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_60(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { - (static_cast(context))->OnSuccessResponse_60(nullableInt32u); + (static_cast(context))->OnSuccessResponse_60(nullableInt8s); } static void OnFailureCallback_61(void * context, EmberAfStatus status) @@ -31977,9 +32458,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_62(chip::to_underlying(status)); } - static void OnSuccessCallback_62(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_62(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { - (static_cast(context))->OnSuccessResponse_62(nullableInt32u); + (static_cast(context))->OnSuccessResponse_62(nullableInt8s); } static void OnFailureCallback_63(void * context, EmberAfStatus status) @@ -31994,9 +32475,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_64(chip::to_underlying(status)); } - static void OnSuccessCallback_64(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_64(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { - (static_cast(context))->OnSuccessResponse_64(nullableInt64u); + (static_cast(context))->OnSuccessResponse_64(nullableInt8s); } static void OnFailureCallback_65(void * context, EmberAfStatus status) @@ -32011,9 +32492,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_66(chip::to_underlying(status)); } - static void OnSuccessCallback_66(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_66(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { - (static_cast(context))->OnSuccessResponse_66(nullableInt64u); + (static_cast(context))->OnSuccessResponse_66(nullableInt16s); } static void OnFailureCallback_67(void * context, EmberAfStatus status) @@ -32028,9 +32509,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_68(chip::to_underlying(status)); } - static void OnSuccessCallback_68(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_68(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { - (static_cast(context))->OnSuccessResponse_68(nullableInt64u); + (static_cast(context))->OnSuccessResponse_68(nullableInt16s); } static void OnFailureCallback_69(void * context, EmberAfStatus status) @@ -32045,9 +32526,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_70(chip::to_underlying(status)); } - static void OnSuccessCallback_70(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_70(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { - (static_cast(context))->OnSuccessResponse_70(nullableInt8s); + (static_cast(context))->OnSuccessResponse_70(nullableInt16s); } static void OnFailureCallback_71(void * context, EmberAfStatus status) @@ -32062,9 +32543,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_72(chip::to_underlying(status)); } - static void OnSuccessCallback_72(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_72(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { - (static_cast(context))->OnSuccessResponse_72(nullableInt8s); + (static_cast(context))->OnSuccessResponse_72(nullableInt32s); } static void OnFailureCallback_73(void * context, EmberAfStatus status) @@ -32079,9 +32560,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_74(chip::to_underlying(status)); } - static void OnSuccessCallback_74(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_74(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { - (static_cast(context))->OnSuccessResponse_74(nullableInt8s); + (static_cast(context))->OnSuccessResponse_74(nullableInt32s); } static void OnFailureCallback_75(void * context, EmberAfStatus status) @@ -32096,9 +32577,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_76(chip::to_underlying(status)); } - static void OnSuccessCallback_76(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_76(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { - (static_cast(context))->OnSuccessResponse_76(nullableInt16s); + (static_cast(context))->OnSuccessResponse_76(nullableInt32s); } static void OnFailureCallback_77(void * context, EmberAfStatus status) @@ -32113,9 +32594,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_78(chip::to_underlying(status)); } - static void OnSuccessCallback_78(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_78(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { - (static_cast(context))->OnSuccessResponse_78(nullableInt16s); + (static_cast(context))->OnSuccessResponse_78(nullableInt64s); } static void OnFailureCallback_79(void * context, EmberAfStatus status) @@ -32130,9 +32611,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_80(chip::to_underlying(status)); } - static void OnSuccessCallback_80(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_80(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { - (static_cast(context))->OnSuccessResponse_80(nullableInt16s); + (static_cast(context))->OnSuccessResponse_80(nullableInt64s); } static void OnFailureCallback_81(void * context, EmberAfStatus status) @@ -32147,9 +32628,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_82(chip::to_underlying(status)); } - static void OnSuccessCallback_82(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_82(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { - (static_cast(context))->OnSuccessResponse_82(nullableInt32s); + (static_cast(context))->OnSuccessResponse_82(nullableInt64s); } static void OnFailureCallback_83(void * context, EmberAfStatus status) @@ -32164,9 +32645,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_84(chip::to_underlying(status)); } - static void OnSuccessCallback_84(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_84(void * context, const chip::app::DataModel::Nullable & nullableEnum8) { - (static_cast(context))->OnSuccessResponse_84(nullableInt32s); + (static_cast(context))->OnSuccessResponse_84(nullableEnum8); } static void OnFailureCallback_85(void * context, EmberAfStatus status) @@ -32181,9 +32662,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_86(chip::to_underlying(status)); } - static void OnSuccessCallback_86(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_86(void * context, const chip::app::DataModel::Nullable & nullableEnum8) { - (static_cast(context))->OnSuccessResponse_86(nullableInt32s); + (static_cast(context))->OnSuccessResponse_86(nullableEnum8); } static void OnFailureCallback_87(void * context, EmberAfStatus status) @@ -32198,9 +32679,9 @@ class TestClusterComplexTypes : public TestCommand (static_cast(context))->OnFailureResponse_88(chip::to_underlying(status)); } - static void OnSuccessCallback_88(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + static void OnSuccessCallback_88(void * context, const chip::app::DataModel::Nullable & nullableEnum8) { - (static_cast(context))->OnSuccessResponse_88(nullableInt64s); + (static_cast(context))->OnSuccessResponse_88(nullableEnum8); } static void OnFailureCallback_89(void * context, EmberAfStatus status) @@ -32210,601 +32691,215 @@ class TestClusterComplexTypes : public TestCommand static void OnSuccessCallback_89(void * context) { (static_cast(context))->OnSuccessResponse_89(); } - static void OnFailureCallback_90(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_90(chip::to_underlying(status)); - } - - static void OnSuccessCallback_90(void * context, const chip::app::DataModel::Nullable & nullableInt64s) - { - (static_cast(context))->OnSuccessResponse_90(nullableInt64s); - } - - static void OnFailureCallback_91(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_91(chip::to_underlying(status)); - } - - static void OnSuccessCallback_91(void * context) { (static_cast(context))->OnSuccessResponse_91(); } - - static void OnFailureCallback_92(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_92(chip::to_underlying(status)); - } - - static void OnSuccessCallback_92(void * context, const chip::app::DataModel::Nullable & nullableInt64s) - { - (static_cast(context))->OnSuccessResponse_92(nullableInt64s); - } - - static void OnFailureCallback_93(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_93(chip::to_underlying(status)); - } - - static void OnSuccessCallback_93(void * context) { (static_cast(context))->OnSuccessResponse_93(); } - - static void OnFailureCallback_94(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_94(chip::to_underlying(status)); - } - - static void OnSuccessCallback_94(void * context, const chip::app::DataModel::Nullable & nullableEnum8) - { - (static_cast(context))->OnSuccessResponse_94(nullableEnum8); - } - - static void OnFailureCallback_95(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_95(chip::to_underlying(status)); - } - - static void OnSuccessCallback_95(void * context) { (static_cast(context))->OnSuccessResponse_95(); } - - static void OnFailureCallback_96(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_96(chip::to_underlying(status)); - } - - static void OnSuccessCallback_96(void * context, const chip::app::DataModel::Nullable & nullableEnum8) - { - (static_cast(context))->OnSuccessResponse_96(nullableEnum8); - } - - static void OnFailureCallback_97(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_97(chip::to_underlying(status)); - } - - static void OnSuccessCallback_97(void * context) { (static_cast(context))->OnSuccessResponse_97(); } - - static void OnFailureCallback_98(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_98(chip::to_underlying(status)); - } - - static void OnSuccessCallback_98(void * context, const chip::app::DataModel::Nullable & nullableEnum8) - { - (static_cast(context))->OnSuccessResponse_98(nullableEnum8); - } - - static void OnFailureCallback_99(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_99(chip::to_underlying(status)); - } - - static void OnSuccessCallback_99(void * context) { (static_cast(context))->OnSuccessResponse_99(); } - - static void OnFailureCallback_100(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_100(chip::to_underlying(status)); - } - - static void OnSuccessCallback_100(void * context, const chip::app::DataModel::Nullable & nullableEnum16) - { - (static_cast(context))->OnSuccessResponse_100(nullableEnum16); - } - - static void OnFailureCallback_101(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_101(chip::to_underlying(status)); - } - - static void OnSuccessCallback_101(void * context) - { - (static_cast(context))->OnSuccessResponse_101(); - } - - static void OnFailureCallback_102(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_102(chip::to_underlying(status)); - } - - static void OnSuccessCallback_102(void * context, const chip::app::DataModel::Nullable & nullableEnum16) - { - (static_cast(context))->OnSuccessResponse_102(nullableEnum16); - } - - static void OnFailureCallback_103(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_103(chip::to_underlying(status)); - } - - static void OnSuccessCallback_103(void * context) - { - (static_cast(context))->OnSuccessResponse_103(); - } - - static void OnFailureCallback_104(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_104(chip::to_underlying(status)); - } - - static void OnSuccessCallback_104(void * context, const chip::app::DataModel::Nullable & nullableEnum16) - { - (static_cast(context))->OnSuccessResponse_104(nullableEnum16); - } - - static void OnFailureCallback_105(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_105(chip::to_underlying(status)); - } - - static void OnSuccessCallback_105(void * context, const chip::app::DataModel::Nullable & nullableOctetString) - { - (static_cast(context))->OnSuccessResponse_105(nullableOctetString); - } - - static void OnFailureCallback_106(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_106(chip::to_underlying(status)); - } - - static void OnSuccessCallback_106(void * context) - { - (static_cast(context))->OnSuccessResponse_106(); - } - - static void OnFailureCallback_107(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_107(chip::to_underlying(status)); - } - - static void OnSuccessCallback_107(void * context, const chip::app::DataModel::Nullable & nullableOctetString) - { - (static_cast(context))->OnSuccessResponse_107(nullableOctetString); - } - - static void OnFailureCallback_108(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_108(chip::to_underlying(status)); - } - - static void OnSuccessCallback_108(void * context) - { - (static_cast(context))->OnSuccessResponse_108(); - } - - static void OnFailureCallback_109(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_109(chip::to_underlying(status)); - } - - static void OnSuccessCallback_109(void * context, const chip::app::DataModel::Nullable & nullableOctetString) - { - (static_cast(context))->OnSuccessResponse_109(nullableOctetString); - } - - static void OnFailureCallback_110(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_110(chip::to_underlying(status)); - } - - static void OnSuccessCallback_110(void * context) - { - (static_cast(context))->OnSuccessResponse_110(); - } - - static void OnFailureCallback_111(void * context, EmberAfStatus status) + static void OnFailureCallback_90(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_111(chip::to_underlying(status)); + (static_cast(context))->OnFailureResponse_90(chip::to_underlying(status)); } - static void OnSuccessCallback_111(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + static void OnSuccessCallback_90(void * context, const chip::app::DataModel::Nullable & nullableEnum16) { - (static_cast(context))->OnSuccessResponse_111(nullableOctetString); + (static_cast(context))->OnSuccessResponse_90(nullableEnum16); } - static void OnFailureCallback_112(void * context, EmberAfStatus status) + static void OnFailureCallback_91(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_112(chip::to_underlying(status)); + (static_cast(context))->OnFailureResponse_91(chip::to_underlying(status)); } - static void OnSuccessCallback_112(void * context, const chip::app::DataModel::Nullable & nullableCharString) + static void OnSuccessCallback_91(void * context) { (static_cast(context))->OnSuccessResponse_91(); } + + static void OnFailureCallback_92(void * context, EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_112(nullableCharString); + (static_cast(context))->OnFailureResponse_92(chip::to_underlying(status)); } - static void OnFailureCallback_113(void * context, EmberAfStatus status) + static void OnSuccessCallback_92(void * context, const chip::app::DataModel::Nullable & nullableEnum16) { - (static_cast(context))->OnFailureResponse_113(chip::to_underlying(status)); + (static_cast(context))->OnSuccessResponse_92(nullableEnum16); } - static void OnSuccessCallback_113(void * context) + static void OnFailureCallback_93(void * context, EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_113(); + (static_cast(context))->OnFailureResponse_93(chip::to_underlying(status)); } - static void OnFailureCallback_114(void * context, EmberAfStatus status) + static void OnSuccessCallback_93(void * context) { (static_cast(context))->OnSuccessResponse_93(); } + + static void OnFailureCallback_94(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_114(chip::to_underlying(status)); + (static_cast(context))->OnFailureResponse_94(chip::to_underlying(status)); } - static void OnSuccessCallback_114(void * context) + static void OnSuccessCallback_94(void * context, const chip::app::DataModel::Nullable & nullableEnum16) { - (static_cast(context))->OnSuccessResponse_114(); + (static_cast(context))->OnSuccessResponse_94(nullableEnum16); } - static void OnFailureCallback_115(void * context, EmberAfStatus status) + static void OnFailureCallback_95(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_115(chip::to_underlying(status)); + (static_cast(context))->OnFailureResponse_95(chip::to_underlying(status)); } - static void OnSuccessCallback_115(void * context, const chip::app::DataModel::Nullable & nullableCharString) + static void OnSuccessCallback_95(void * context, const chip::app::DataModel::Nullable & nullableOctetString) { - (static_cast(context))->OnSuccessResponse_115(nullableCharString); + (static_cast(context))->OnSuccessResponse_95(nullableOctetString); } - static void OnFailureCallback_116(void * context, EmberAfStatus status) + static void OnFailureCallback_96(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_116(chip::to_underlying(status)); + (static_cast(context))->OnFailureResponse_96(chip::to_underlying(status)); } - static void OnSuccessCallback_116(void * context) + static void OnSuccessCallback_96(void * context) { (static_cast(context))->OnSuccessResponse_96(); } + + static void OnFailureCallback_97(void * context, EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_116(); + (static_cast(context))->OnFailureResponse_97(chip::to_underlying(status)); } - static void OnFailureCallback_117(void * context, EmberAfStatus status) + static void OnSuccessCallback_97(void * context, const chip::app::DataModel::Nullable & nullableOctetString) { - (static_cast(context))->OnFailureResponse_117(chip::to_underlying(status)); + (static_cast(context))->OnSuccessResponse_97(nullableOctetString); } - static void OnSuccessCallback_117(void * context, const chip::app::DataModel::Nullable & nullableCharString) + static void OnFailureCallback_98(void * context, EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_117(nullableCharString); + (static_cast(context))->OnFailureResponse_98(chip::to_underlying(status)); } - // - // Tests methods - // + static void OnSuccessCallback_98(void * context) { (static_cast(context))->OnSuccessResponse_98(); } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_0() + static void OnFailureCallback_99(void * context, EmberAfStatus status) { - 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); - - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_0(data.value); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_0(status); - }; - - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + (static_cast(context))->OnFailureResponse_99(chip::to_underlying(status)); } - void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_0(bool value) + static void OnSuccessCallback_99(void * context, const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValue("value", value, true)); - NextTest(); + (static_cast(context))->OnSuccessResponse_99(nullableOctetString); } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_1() + static void OnFailureCallback_100(void * context, EmberAfStatus status) { - 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); - - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_1(data.value); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_1(status); - }; - - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + (static_cast(context))->OnFailureResponse_100(chip::to_underlying(status)); } - void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_1(bool value) + static void OnSuccessCallback_100(void * context) { - VerifyOrReturn(CheckValue("value", value, false)); - NextTest(); + (static_cast(context))->OnSuccessResponse_100(); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_2() + static void OnFailureCallback_101(void * context, EmberAfStatus status) { - 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_2(data.value); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); - }; - - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + (static_cast(context))->OnFailureResponse_101(chip::to_underlying(status)); } - void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_2(bool value) + static void OnSuccessCallback_101(void * context, const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValue("value", value, true)); - NextTest(); + (static_cast(context))->OnSuccessResponse_101(nullableOctetString); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_3() + static void OnFailureCallback_102(void * context, EmberAfStatus status) { - 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_3(data.value); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_3(status); - }; - - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + (static_cast(context))->OnFailureResponse_102(chip::to_underlying(status)); } - void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_3(bool value) + static void OnSuccessCallback_102(void * context, const chip::app::DataModel::Nullable & nullableCharString) { - VerifyOrReturn(CheckValue("value", value, false)); - NextTest(); + (static_cast(context))->OnSuccessResponse_102(nullableCharString); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_4() + static void OnFailureCallback_103(void * context, EmberAfStatus status) { - 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_4(data.arg1); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_4(status); - }; - - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + (static_cast(context))->OnFailureResponse_103(chip::to_underlying(status)); } - void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & arg1) + static void OnSuccessCallback_103(void * context) { - 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(); + (static_cast(context))->OnSuccessResponse_103(); } - CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_5() + static void OnFailureCallback_104(void * context, EmberAfStatus status) { - 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_5(data.arg1); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_5(status); - }; - - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + (static_cast(context))->OnFailureResponse_104(chip::to_underlying(status)); } - void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & arg1) + static void OnSuccessCallback_104(void * context) { - auto iter = arg1.begin(); - VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 0)); - NextTest(); + (static_cast(context))->OnSuccessResponse_104(); } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_6() + static void OnFailureCallback_105(void * context, EmberAfStatus status) { - 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[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); - - request.arg1 = arg1List; - - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_6(data.value); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_6(status); - }; + (static_cast(context))->OnFailureResponse_105(chip::to_underlying(status)); + } - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; + static void OnSuccessCallback_105(void * context, const chip::app::DataModel::Nullable & nullableCharString) + { + (static_cast(context))->OnSuccessResponse_105(nullableCharString); } - void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_6(bool value) + static void OnFailureCallback_106(void * context, EmberAfStatus status) { - VerifyOrReturn(CheckValue("value", value, true)); - NextTest(); + (static_cast(context))->OnFailureResponse_106(chip::to_underlying(status)); } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_7() + static void OnSuccessCallback_106(void * context) { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; + (static_cast(context))->OnSuccessResponse_106(); + } - RequestType request; + static void OnFailureCallback_107(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_107(chip::to_underlying(status)); + } - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List[2]; + static void OnSuccessCallback_107(void * context, const chip::app::DataModel::Nullable & nullableCharString) + { + (static_cast(context))->OnSuccessResponse_107(nullableCharString); + } - 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); + // + // Tests methods + // - 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); + CHIP_ERROR TestSendTestCommandWithOptionalArgSetToNull_0() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; - request.arg1 = arg1List; + RequestType request; + request.arg1.Emplace().SetNull(); auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_7(data.value); + (static_cast(context)) + ->OnSuccessResponse_0(data.wasPresent, data.wasNull, data.value, data.originalValue); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_7(status); + (static_cast(context))->OnFailureResponse_0(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_7(bool value) + void OnSuccessResponse_0(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + const chip::Optional> & originalValue) { - VerifyOrReturn(CheckValue("value", value, false)); + VerifyOrReturn(CheckValue("wasPresent", wasPresent, true)); + + VerifyOrReturn(CheckValuePresent("wasNull", wasNull)); + VerifyOrReturn(CheckValue("wasNull.Value()", wasNull.Value(), true)); + + VerifyOrReturn(CheckValuePresent("originalValue", originalValue)); + VerifyOrReturn(CheckValueNull("originalValue.Value()", originalValue.Value())); NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_8() + CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_1() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -32820,26 +32915,26 @@ class TestClusterComplexTypes : public TestCommand listInt8uArgument = listInt8uList; return cluster.WriteAttribute( - listInt8uArgument, this, OnSuccessCallback_8, OnFailureCallback_8); + listInt8uArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_8() { NextTest(); } + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfInt8u_9() + CHIP_ERROR TestReadAttributeListWithListOfInt8u_2() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); - return cluster.ReadAttribute(this, OnSuccessCallback_9, - OnFailureCallback_9); + return cluster.ReadAttribute(this, OnSuccessCallback_2, + OnFailureCallback_2); } - void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_9(const chip::app::DataModel::DecodableList & listInt8u) + void OnSuccessResponse_2(const chip::app::DataModel::DecodableList & listInt8u) { auto iter = listInt8u.begin(); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 0)); @@ -32854,7 +32949,7 @@ class TestClusterComplexTypes : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfOctetString_10() + CHIP_ERROR TestWriteAttributeListWithListOfOctetString_3() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -32870,26 +32965,26 @@ class TestClusterComplexTypes : public TestCommand listOctetStringArgument = listOctetStringList; return cluster.WriteAttribute( - listOctetStringArgument, this, OnSuccessCallback_10, OnFailureCallback_10); + listOctetStringArgument, this, OnSuccessCallback_3, OnFailureCallback_3); } - void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_10() { NextTest(); } + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfOctetString_11() + CHIP_ERROR TestReadAttributeListWithListOfOctetString_4() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_11, OnFailureCallback_11); + this, OnSuccessCallback_4, OnFailureCallback_4); } - void OnFailureResponse_11(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_11(const chip::app::DataModel::DecodableList & listOctetString) + void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & listOctetString) { auto iter = listOctetString.begin(); VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter, 0)); @@ -32908,7 +33003,7 @@ class TestClusterComplexTypes : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_12() + CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_5() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -32938,26 +33033,26 @@ class TestClusterComplexTypes : public TestCommand listStructOctetStringArgument = listStructOctetStringList; return cluster.WriteAttribute( - listStructOctetStringArgument, this, OnSuccessCallback_12, OnFailureCallback_12); + listStructOctetStringArgument, this, OnSuccessCallback_5, OnFailureCallback_5); } - void OnFailureResponse_12(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_12() { NextTest(); } + void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_13() + CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_6() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_13, OnFailureCallback_13); + this, OnSuccessCallback_6, OnFailureCallback_6); } - void OnFailureResponse_13(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_13( + void OnSuccessResponse_6( const chip::app::DataModel::DecodableList & listStructOctetString) { @@ -32982,113 +33077,7 @@ class TestClusterComplexTypes : public TestCommand NextTest(); } - CHIP_ERROR TestSendTestCommandWithOptionalArgSet_14() - { - 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_14(data.wasPresent, data.wasNull, data.value, data.originalValue); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_14(status); - }; - - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_14(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_14(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_15() - { - 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_15(data.wasPresent, data.wasNull, data.value, data.originalValue); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_15(status); - }; - - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_15(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_15(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, - const chip::Optional> & originalValue) - { - VerifyOrReturn(CheckValue("wasPresent", wasPresent, false)); - - NextTest(); - } - - CHIP_ERROR TestSendTestCommandWithOptionalArgSetToNull_16() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; - - RequestType request; - request.arg1.Emplace().SetNull(); - - auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context)) - ->OnSuccessResponse_16(data.wasPresent, data.wasNull, data.value, data.originalValue); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_16(status); - }; - - ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_16(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_16(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(), true)); - - VerifyOrReturn(CheckValuePresent("originalValue", originalValue)); - VerifyOrReturn(CheckValueNull("originalValue.Value()", originalValue.Value())); - NextTest(); - } - - CHIP_ERROR TestWriteAttributeNullableBooleanNull_17() + CHIP_ERROR TestWriteAttributeNullableBooleanNull_7() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33098,32 +33087,32 @@ class TestClusterComplexTypes : public TestCommand nullableBooleanArgument.SetNull(); return cluster.WriteAttribute( - nullableBooleanArgument, this, OnSuccessCallback_17, OnFailureCallback_17); + nullableBooleanArgument, this, OnSuccessCallback_7, OnFailureCallback_7); } - void OnFailureResponse_17(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_17() { NextTest(); } + void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBooleanNull_18() + CHIP_ERROR TestReadAttributeNullableBooleanNull_8() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_18, OnFailureCallback_18); + this, OnSuccessCallback_8, OnFailureCallback_8); } - void OnFailureResponse_18(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_18(const chip::app::DataModel::Nullable & nullableBoolean) + void OnSuccessResponse_8(const chip::app::DataModel::Nullable & nullableBoolean) { VerifyOrReturn(CheckValueNull("nullableBoolean", nullableBoolean)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBooleanTrue_19() + CHIP_ERROR TestWriteAttributeNullableBooleanTrue_9() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33133,33 +33122,33 @@ class TestClusterComplexTypes : public TestCommand nullableBooleanArgument.SetNonNull() = true; return cluster.WriteAttribute( - nullableBooleanArgument, this, OnSuccessCallback_19, OnFailureCallback_19); + nullableBooleanArgument, this, OnSuccessCallback_9, OnFailureCallback_9); } - void OnFailureResponse_19(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_19() { NextTest(); } + void OnSuccessResponse_9() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBooleanTrue_20() + CHIP_ERROR TestReadAttributeNullableBooleanTrue_10() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_20, OnFailureCallback_20); + this, OnSuccessCallback_10, OnFailureCallback_10); } - void OnFailureResponse_20(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_20(const chip::app::DataModel::Nullable & nullableBoolean) + void OnSuccessResponse_10(const chip::app::DataModel::Nullable & nullableBoolean) { VerifyOrReturn(CheckValueNonNull("nullableBoolean", nullableBoolean)); VerifyOrReturn(CheckValue("nullableBoolean.Value()", nullableBoolean.Value(), true)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_21() + CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_11() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33169,33 +33158,33 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap8Argument.SetNonNull() = 254; return cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_21, OnFailureCallback_21); + nullableBitmap8Argument, this, OnSuccessCallback_11, OnFailureCallback_11); } - void OnFailureResponse_21(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_11(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_21() { NextTest(); } + void OnSuccessResponse_11() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_22() + CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_12() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_22, OnFailureCallback_22); + this, OnSuccessCallback_12, OnFailureCallback_12); } - void OnFailureResponse_22(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_12(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_22(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_12(const chip::app::DataModel::Nullable & nullableBitmap8) { VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_23() + CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_13() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33205,33 +33194,33 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap8Argument.SetNonNull() = 255; return cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_23, OnFailureCallback_23); + nullableBitmap8Argument, this, OnSuccessCallback_13, OnFailureCallback_13); } - void OnFailureResponse_23(uint8_t status) { NextTest(); } + void OnFailureResponse_13(uint8_t status) { NextTest(); } - void OnSuccessResponse_23() { ThrowSuccessResponse(); } + void OnSuccessResponse_13() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_24() + CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_14() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_24, OnFailureCallback_24); + this, OnSuccessCallback_14, OnFailureCallback_14); } - void OnFailureResponse_24(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_14(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_24(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_14(const chip::app::DataModel::Nullable & nullableBitmap8) { VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_25() + CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_15() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33241,32 +33230,32 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap8Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_25, OnFailureCallback_25); + nullableBitmap8Argument, this, OnSuccessCallback_15, OnFailureCallback_15); } - void OnFailureResponse_25(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_15(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_25() { NextTest(); } + void OnSuccessResponse_15() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_26() + CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_16() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_26, OnFailureCallback_26); + this, OnSuccessCallback_16, OnFailureCallback_16); } - void OnFailureResponse_26(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_16(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_26(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_16(const chip::app::DataModel::Nullable & nullableBitmap8) { VerifyOrReturn(CheckValueNull("nullableBitmap8", nullableBitmap8)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_27() + CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_17() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33276,33 +33265,33 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap16Argument.SetNonNull() = 65534U; return cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_27, OnFailureCallback_27); + nullableBitmap16Argument, this, OnSuccessCallback_17, OnFailureCallback_17); } - void OnFailureResponse_27(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_17(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_27() { NextTest(); } + void OnSuccessResponse_17() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_28() + CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_18() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_28, OnFailureCallback_28); + this, OnSuccessCallback_18, OnFailureCallback_18); } - void OnFailureResponse_28(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_18(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_28(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_18(const chip::app::DataModel::Nullable & nullableBitmap16) { VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_29() + CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_19() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33312,33 +33301,33 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap16Argument.SetNonNull() = 65535U; return cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_29, OnFailureCallback_29); + nullableBitmap16Argument, this, OnSuccessCallback_19, OnFailureCallback_19); } - void OnFailureResponse_29(uint8_t status) { NextTest(); } + void OnFailureResponse_19(uint8_t status) { NextTest(); } - void OnSuccessResponse_29() { ThrowSuccessResponse(); } + void OnSuccessResponse_19() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_30() + CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_20() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_30, OnFailureCallback_30); + this, OnSuccessCallback_20, OnFailureCallback_20); } - void OnFailureResponse_30(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_20(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_30(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_20(const chip::app::DataModel::Nullable & nullableBitmap16) { VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_31() + CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_21() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33348,32 +33337,32 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap16Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_31, OnFailureCallback_31); + nullableBitmap16Argument, this, OnSuccessCallback_21, OnFailureCallback_21); } - void OnFailureResponse_31(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_21(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_31() { NextTest(); } + void OnSuccessResponse_21() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_32() + CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_22() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_32, OnFailureCallback_32); + this, OnSuccessCallback_22, OnFailureCallback_22); } - void OnFailureResponse_32(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_22(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_32(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_22(const chip::app::DataModel::Nullable & nullableBitmap16) { VerifyOrReturn(CheckValueNull("nullableBitmap16", nullableBitmap16)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_33() + CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_23() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33383,33 +33372,33 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap32Argument.SetNonNull() = 4294967294UL; return cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_33, OnFailureCallback_33); + nullableBitmap32Argument, this, OnSuccessCallback_23, OnFailureCallback_23); } - void OnFailureResponse_33(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_23(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_33() { NextTest(); } + void OnSuccessResponse_23() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_34() + CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_24() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_34, OnFailureCallback_34); + this, OnSuccessCallback_24, OnFailureCallback_24); } - void OnFailureResponse_34(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_24(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_34(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_24(const chip::app::DataModel::Nullable & nullableBitmap32) { VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_35() + CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_25() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33419,33 +33408,33 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap32Argument.SetNonNull() = 4294967295UL; return cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_35, OnFailureCallback_35); + nullableBitmap32Argument, this, OnSuccessCallback_25, OnFailureCallback_25); } - void OnFailureResponse_35(uint8_t status) { NextTest(); } + void OnFailureResponse_25(uint8_t status) { NextTest(); } - void OnSuccessResponse_35() { ThrowSuccessResponse(); } + void OnSuccessResponse_25() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_36() + CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_26() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_36, OnFailureCallback_36); + this, OnSuccessCallback_26, OnFailureCallback_26); } - void OnFailureResponse_36(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_26(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_36(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_26(const chip::app::DataModel::Nullable & nullableBitmap32) { VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_37() + CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_27() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33455,32 +33444,32 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap32Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_37, OnFailureCallback_37); + nullableBitmap32Argument, this, OnSuccessCallback_27, OnFailureCallback_27); } - void OnFailureResponse_37(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_27(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_37() { NextTest(); } + void OnSuccessResponse_27() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_38() + CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_28() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_38, OnFailureCallback_38); + this, OnSuccessCallback_28, OnFailureCallback_28); } - void OnFailureResponse_38(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_28(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_38(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_28(const chip::app::DataModel::Nullable & nullableBitmap32) { VerifyOrReturn(CheckValueNull("nullableBitmap32", nullableBitmap32)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_39() + CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_29() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33490,33 +33479,33 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap64Argument.SetNonNull() = 18446744073709551614ULL; return cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_39, OnFailureCallback_39); + nullableBitmap64Argument, this, OnSuccessCallback_29, OnFailureCallback_29); } - void OnFailureResponse_39(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_29(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_39() { NextTest(); } + void OnSuccessResponse_29() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_40() + CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_30() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_40, OnFailureCallback_40); + this, OnSuccessCallback_30, OnFailureCallback_30); } - void OnFailureResponse_40(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_30(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_40(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_30(const chip::app::DataModel::Nullable & nullableBitmap64) { VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_41() + CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_31() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33526,33 +33515,33 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap64Argument.SetNonNull() = 18446744073709551615ULL; return cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_41, OnFailureCallback_41); + nullableBitmap64Argument, this, OnSuccessCallback_31, OnFailureCallback_31); } - void OnFailureResponse_41(uint8_t status) { NextTest(); } + void OnFailureResponse_31(uint8_t status) { NextTest(); } - void OnSuccessResponse_41() { ThrowSuccessResponse(); } + void OnSuccessResponse_31() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_42() + CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_32() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_42, OnFailureCallback_42); + this, OnSuccessCallback_32, OnFailureCallback_32); } - void OnFailureResponse_42(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_32(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_42(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_32(const chip::app::DataModel::Nullable & nullableBitmap64) { VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_43() + CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_33() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33562,32 +33551,32 @@ class TestClusterComplexTypes : public TestCommand nullableBitmap64Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_43, OnFailureCallback_43); + nullableBitmap64Argument, this, OnSuccessCallback_33, OnFailureCallback_33); } - void OnFailureResponse_43(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_33(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_43() { NextTest(); } + void OnSuccessResponse_33() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_44() + CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_34() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_44, OnFailureCallback_44); + this, OnSuccessCallback_34, OnFailureCallback_34); } - void OnFailureResponse_44(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_34(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_44(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_34(const chip::app::DataModel::Nullable & nullableBitmap64) { VerifyOrReturn(CheckValueNull("nullableBitmap64", nullableBitmap64)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_45() + CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_35() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33597,33 +33586,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt8uArgument.SetNonNull() = 254; return cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_45, OnFailureCallback_45); + nullableInt8uArgument, this, OnSuccessCallback_35, OnFailureCallback_35); } - void OnFailureResponse_45(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_35(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_45() { NextTest(); } + void OnSuccessResponse_35() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_46() + CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_36() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_46, OnFailureCallback_46); + this, OnSuccessCallback_36, OnFailureCallback_36); } - void OnFailureResponse_46(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_36(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_46(const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_36(const chip::app::DataModel::Nullable & nullableInt8u) { VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_47() + CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_37() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33633,33 +33622,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt8uArgument.SetNonNull() = 255; return cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_47, OnFailureCallback_47); + nullableInt8uArgument, this, OnSuccessCallback_37, OnFailureCallback_37); } - void OnFailureResponse_47(uint8_t status) { NextTest(); } + void OnFailureResponse_37(uint8_t status) { NextTest(); } - void OnSuccessResponse_47() { ThrowSuccessResponse(); } + void OnSuccessResponse_37() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_48() + CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_38() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_48, OnFailureCallback_48); + this, OnSuccessCallback_38, OnFailureCallback_38); } - void OnFailureResponse_48(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_38(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_48(const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_38(const chip::app::DataModel::Nullable & nullableInt8u) { VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_49() + CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_39() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33669,32 +33658,32 @@ class TestClusterComplexTypes : public TestCommand nullableInt8uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_49, OnFailureCallback_49); + nullableInt8uArgument, this, OnSuccessCallback_39, OnFailureCallback_39); } - void OnFailureResponse_49(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_39(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_49() { NextTest(); } + void OnSuccessResponse_39() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8uNullValue_50() + CHIP_ERROR TestReadAttributeNullableInt8uNullValue_40() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_50, OnFailureCallback_50); + this, OnSuccessCallback_40, OnFailureCallback_40); } - void OnFailureResponse_50(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_40(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_50(const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_40(const chip::app::DataModel::Nullable & nullableInt8u) { VerifyOrReturn(CheckValueNull("nullableInt8u", nullableInt8u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_51() + CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_41() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33704,33 +33693,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt16uArgument.SetNonNull() = 65534U; return cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_51, OnFailureCallback_51); + nullableInt16uArgument, this, OnSuccessCallback_41, OnFailureCallback_41); } - void OnFailureResponse_51(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_41(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_51() { NextTest(); } + void OnSuccessResponse_41() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_52() + CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_42() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_52, OnFailureCallback_52); + this, OnSuccessCallback_42, OnFailureCallback_42); } - void OnFailureResponse_52(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_42(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_52(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_42(const chip::app::DataModel::Nullable & nullableInt16u) { VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_53() + CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_43() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33740,33 +33729,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt16uArgument.SetNonNull() = 65535U; return cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_53, OnFailureCallback_53); + nullableInt16uArgument, this, OnSuccessCallback_43, OnFailureCallback_43); } - void OnFailureResponse_53(uint8_t status) { NextTest(); } + void OnFailureResponse_43(uint8_t status) { NextTest(); } - void OnSuccessResponse_53() { ThrowSuccessResponse(); } + void OnSuccessResponse_43() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_54() + CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_44() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_54, OnFailureCallback_54); + this, OnSuccessCallback_44, OnFailureCallback_44); } - void OnFailureResponse_54(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_44(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_54(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_44(const chip::app::DataModel::Nullable & nullableInt16u) { VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_55() + CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_45() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33776,32 +33765,32 @@ class TestClusterComplexTypes : public TestCommand nullableInt16uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_55, OnFailureCallback_55); + nullableInt16uArgument, this, OnSuccessCallback_45, OnFailureCallback_45); } - void OnFailureResponse_55(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_45(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_55() { NextTest(); } + void OnSuccessResponse_45() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uNullValue_56() + CHIP_ERROR TestReadAttributeNullableInt16uNullValue_46() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_56, OnFailureCallback_56); + this, OnSuccessCallback_46, OnFailureCallback_46); } - void OnFailureResponse_56(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_46(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_56(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_46(const chip::app::DataModel::Nullable & nullableInt16u) { VerifyOrReturn(CheckValueNull("nullableInt16u", nullableInt16u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_57() + CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_47() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33811,33 +33800,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt32uArgument.SetNonNull() = 4294967294UL; return cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_57, OnFailureCallback_57); + nullableInt32uArgument, this, OnSuccessCallback_47, OnFailureCallback_47); } - void OnFailureResponse_57(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_47(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_57() { NextTest(); } + void OnSuccessResponse_47() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_58() + CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_48() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_58, OnFailureCallback_58); + this, OnSuccessCallback_48, OnFailureCallback_48); } - void OnFailureResponse_58(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_48(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_58(const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_48(const chip::app::DataModel::Nullable & nullableInt32u) { VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_59() + CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_49() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33847,33 +33836,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt32uArgument.SetNonNull() = 4294967295UL; return cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_59, OnFailureCallback_59); + nullableInt32uArgument, this, OnSuccessCallback_49, OnFailureCallback_49); } - void OnFailureResponse_59(uint8_t status) { NextTest(); } + void OnFailureResponse_49(uint8_t status) { NextTest(); } - void OnSuccessResponse_59() { ThrowSuccessResponse(); } + void OnSuccessResponse_49() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_60() + CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_50() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_60, OnFailureCallback_60); + this, OnSuccessCallback_50, OnFailureCallback_50); } - void OnFailureResponse_60(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_50(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_60(const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_50(const chip::app::DataModel::Nullable & nullableInt32u) { VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_61() + CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_51() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33883,32 +33872,32 @@ class TestClusterComplexTypes : public TestCommand nullableInt32uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_61, OnFailureCallback_61); + nullableInt32uArgument, this, OnSuccessCallback_51, OnFailureCallback_51); } - void OnFailureResponse_61(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_51(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_61() { NextTest(); } + void OnSuccessResponse_51() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32uNullValue_62() + CHIP_ERROR TestReadAttributeNullableInt32uNullValue_52() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_62, OnFailureCallback_62); + this, OnSuccessCallback_52, OnFailureCallback_52); } - void OnFailureResponse_62(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_52(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_62(const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_52(const chip::app::DataModel::Nullable & nullableInt32u) { VerifyOrReturn(CheckValueNull("nullableInt32u", nullableInt32u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_63() + CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_53() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33918,33 +33907,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt64uArgument.SetNonNull() = 18446744073709551614ULL; return cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_63, OnFailureCallback_63); + nullableInt64uArgument, this, OnSuccessCallback_53, OnFailureCallback_53); } - void OnFailureResponse_63(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_53(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_63() { NextTest(); } + void OnSuccessResponse_53() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_64() + CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_54() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_64, OnFailureCallback_64); + this, OnSuccessCallback_54, OnFailureCallback_54); } - void OnFailureResponse_64(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_54(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_64(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_54(const chip::app::DataModel::Nullable & nullableInt64u) { VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_65() + CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_55() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33954,33 +33943,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt64uArgument.SetNonNull() = 18446744073709551615ULL; return cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_65, OnFailureCallback_65); + nullableInt64uArgument, this, OnSuccessCallback_55, OnFailureCallback_55); } - void OnFailureResponse_65(uint8_t status) { NextTest(); } + void OnFailureResponse_55(uint8_t status) { NextTest(); } - void OnSuccessResponse_65() { ThrowSuccessResponse(); } + void OnSuccessResponse_55() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_66() + CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_56() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_66, OnFailureCallback_66); + this, OnSuccessCallback_56, OnFailureCallback_56); } - void OnFailureResponse_66(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_56(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_66(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_56(const chip::app::DataModel::Nullable & nullableInt64u) { VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_67() + CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_57() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -33990,32 +33979,32 @@ class TestClusterComplexTypes : public TestCommand nullableInt64uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_67, OnFailureCallback_67); + nullableInt64uArgument, this, OnSuccessCallback_57, OnFailureCallback_57); } - void OnFailureResponse_67(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_57(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_67() { NextTest(); } + void OnSuccessResponse_57() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uNullValue_68() + CHIP_ERROR TestReadAttributeNullableInt64uNullValue_58() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_68, OnFailureCallback_68); + this, OnSuccessCallback_58, OnFailureCallback_58); } - void OnFailureResponse_68(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_58(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_68(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_58(const chip::app::DataModel::Nullable & nullableInt64u) { VerifyOrReturn(CheckValueNull("nullableInt64u", nullableInt64u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_69() + CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_59() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34025,33 +34014,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt8sArgument.SetNonNull() = -127; return cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_69, OnFailureCallback_69); + nullableInt8sArgument, this, OnSuccessCallback_59, OnFailureCallback_59); } - void OnFailureResponse_69(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_59(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_69() { NextTest(); } + void OnSuccessResponse_59() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8sMinValue_70() + CHIP_ERROR TestReadAttributeNullableInt8sMinValue_60() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_70, OnFailureCallback_70); + this, OnSuccessCallback_60, OnFailureCallback_60); } - void OnFailureResponse_70(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_60(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_70(const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_60(const chip::app::DataModel::Nullable & nullableInt8s) { VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_71() + CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_61() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34061,33 +34050,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt8sArgument.SetNonNull() = -128; return cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_71, OnFailureCallback_71); + nullableInt8sArgument, this, OnSuccessCallback_61, OnFailureCallback_61); } - void OnFailureResponse_71(uint8_t status) { NextTest(); } + void OnFailureResponse_61(uint8_t status) { NextTest(); } - void OnSuccessResponse_71() { ThrowSuccessResponse(); } + void OnSuccessResponse_61() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_72() + CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_62() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_72, OnFailureCallback_72); + this, OnSuccessCallback_62, OnFailureCallback_62); } - void OnFailureResponse_72(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_62(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_72(const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_62(const chip::app::DataModel::Nullable & nullableInt8s) { VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_73() + CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_63() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34097,32 +34086,32 @@ class TestClusterComplexTypes : public TestCommand nullableInt8sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_73, OnFailureCallback_73); + nullableInt8sArgument, this, OnSuccessCallback_63, OnFailureCallback_63); } - void OnFailureResponse_73(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_63(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_73() { NextTest(); } + void OnSuccessResponse_63() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8sNullValue_74() + CHIP_ERROR TestReadAttributeNullableInt8sNullValue_64() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_74, OnFailureCallback_74); + this, OnSuccessCallback_64, OnFailureCallback_64); } - void OnFailureResponse_74(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_64(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_74(const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_64(const chip::app::DataModel::Nullable & nullableInt8s) { VerifyOrReturn(CheckValueNull("nullableInt8s", nullableInt8s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_75() + CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_65() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34132,33 +34121,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt16sArgument.SetNonNull() = -32767; return cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_75, OnFailureCallback_75); + nullableInt16sArgument, this, OnSuccessCallback_65, OnFailureCallback_65); } - void OnFailureResponse_75(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_65(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_75() { NextTest(); } + void OnSuccessResponse_65() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sMinValue_76() + CHIP_ERROR TestReadAttributeNullableInt16sMinValue_66() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_76, OnFailureCallback_76); + this, OnSuccessCallback_66, OnFailureCallback_66); } - void OnFailureResponse_76(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_66(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_76(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_66(const chip::app::DataModel::Nullable & nullableInt16s) { VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_77() + CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_67() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34168,33 +34157,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt16sArgument.SetNonNull() = -32768; return cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_77, OnFailureCallback_77); + nullableInt16sArgument, this, OnSuccessCallback_67, OnFailureCallback_67); } - void OnFailureResponse_77(uint8_t status) { NextTest(); } + void OnFailureResponse_67(uint8_t status) { NextTest(); } - void OnSuccessResponse_77() { ThrowSuccessResponse(); } + void OnSuccessResponse_67() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_78() + CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_68() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_78, OnFailureCallback_78); + this, OnSuccessCallback_68, OnFailureCallback_68); } - void OnFailureResponse_78(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_68(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_78(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_68(const chip::app::DataModel::Nullable & nullableInt16s) { VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_79() + CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_69() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34204,32 +34193,32 @@ class TestClusterComplexTypes : public TestCommand nullableInt16sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_79, OnFailureCallback_79); + nullableInt16sArgument, this, OnSuccessCallback_69, OnFailureCallback_69); } - void OnFailureResponse_79(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_69(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_79() { NextTest(); } + void OnSuccessResponse_69() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sNullValue_80() + CHIP_ERROR TestReadAttributeNullableInt16sNullValue_70() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_80, OnFailureCallback_80); + this, OnSuccessCallback_70, OnFailureCallback_70); } - void OnFailureResponse_80(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_70(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_80(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_70(const chip::app::DataModel::Nullable & nullableInt16s) { VerifyOrReturn(CheckValueNull("nullableInt16s", nullableInt16s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_81() + CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_71() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34239,33 +34228,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt32sArgument.SetNonNull() = -2147483647L; return cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_81, OnFailureCallback_81); + nullableInt32sArgument, this, OnSuccessCallback_71, OnFailureCallback_71); } - void OnFailureResponse_81(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_71(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_81() { NextTest(); } + void OnSuccessResponse_71() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32sMinValue_82() + CHIP_ERROR TestReadAttributeNullableInt32sMinValue_72() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_82, OnFailureCallback_82); + this, OnSuccessCallback_72, OnFailureCallback_72); } - void OnFailureResponse_82(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_72(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_82(const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_72(const chip::app::DataModel::Nullable & nullableInt32s) { VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_83() + CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_73() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34275,33 +34264,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt32sArgument.SetNonNull() = -2147483648L; return cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_83, OnFailureCallback_83); + nullableInt32sArgument, this, OnSuccessCallback_73, OnFailureCallback_73); } - void OnFailureResponse_83(uint8_t status) { NextTest(); } + void OnFailureResponse_73(uint8_t status) { NextTest(); } - void OnSuccessResponse_83() { ThrowSuccessResponse(); } + void OnSuccessResponse_73() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_84() + CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_74() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_84, OnFailureCallback_84); + this, OnSuccessCallback_74, OnFailureCallback_74); } - void OnFailureResponse_84(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_74(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_84(const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_74(const chip::app::DataModel::Nullable & nullableInt32s) { VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_85() + CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_75() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34311,32 +34300,32 @@ class TestClusterComplexTypes : public TestCommand nullableInt32sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_85, OnFailureCallback_85); + nullableInt32sArgument, this, OnSuccessCallback_75, OnFailureCallback_75); } - void OnFailureResponse_85(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_75(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_85() { NextTest(); } + void OnSuccessResponse_75() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32sNullValue_86() + CHIP_ERROR TestReadAttributeNullableInt32sNullValue_76() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_86, OnFailureCallback_86); + this, OnSuccessCallback_76, OnFailureCallback_76); } - void OnFailureResponse_86(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_76(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_86(const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_76(const chip::app::DataModel::Nullable & nullableInt32s) { VerifyOrReturn(CheckValueNull("nullableInt32s", nullableInt32s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_87() + CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_77() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34346,33 +34335,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt64sArgument.SetNonNull() = -9223372036854775807LL; return cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_87, OnFailureCallback_87); + nullableInt64sArgument, this, OnSuccessCallback_77, OnFailureCallback_77); } - void OnFailureResponse_87(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_77(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_87() { NextTest(); } + void OnSuccessResponse_77() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sMinValue_88() + CHIP_ERROR TestReadAttributeNullableInt64sMinValue_78() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_88, OnFailureCallback_88); + this, OnSuccessCallback_78, OnFailureCallback_78); } - void OnFailureResponse_88(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_78(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_88(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_78(const chip::app::DataModel::Nullable & nullableInt64s) { VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_89() + CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_79() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34382,33 +34371,33 @@ class TestClusterComplexTypes : public TestCommand nullableInt64sArgument.SetNonNull() = -9223372036854775807LL - 1LL; return cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_89, OnFailureCallback_89); + nullableInt64sArgument, this, OnSuccessCallback_79, OnFailureCallback_79); } - void OnFailureResponse_89(uint8_t status) { NextTest(); } + void OnFailureResponse_79(uint8_t status) { NextTest(); } - void OnSuccessResponse_89() { ThrowSuccessResponse(); } + void OnSuccessResponse_79() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_90() + CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_80() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_90, OnFailureCallback_90); + this, OnSuccessCallback_80, OnFailureCallback_80); } - void OnFailureResponse_90(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_80(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_90(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_80(const chip::app::DataModel::Nullable & nullableInt64s) { VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_91() + CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_81() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34418,32 +34407,32 @@ class TestClusterComplexTypes : public TestCommand nullableInt64sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_91, OnFailureCallback_91); + nullableInt64sArgument, this, OnSuccessCallback_81, OnFailureCallback_81); } - void OnFailureResponse_91(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_81(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_91() { NextTest(); } + void OnSuccessResponse_81() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sNullValue_92() + CHIP_ERROR TestReadAttributeNullableInt64sNullValue_82() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_92, OnFailureCallback_92); + this, OnSuccessCallback_82, OnFailureCallback_82); } - void OnFailureResponse_92(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_82(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_92(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_82(const chip::app::DataModel::Nullable & nullableInt64s) { VerifyOrReturn(CheckValueNull("nullableInt64s", nullableInt64s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_93() + CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_83() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34453,33 +34442,33 @@ class TestClusterComplexTypes : public TestCommand nullableEnum8Argument.SetNonNull() = static_cast(254); return cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_93, OnFailureCallback_93); + nullableEnum8Argument, this, OnSuccessCallback_83, OnFailureCallback_83); } - void OnFailureResponse_93(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_83(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_93() { NextTest(); } + void OnSuccessResponse_83() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_94() + CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_84() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_94, OnFailureCallback_94); + this, OnSuccessCallback_84, OnFailureCallback_84); } - void OnFailureResponse_94(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_84(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_94(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_84(const chip::app::DataModel::Nullable & nullableEnum8) { VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_95() + CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_85() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34489,33 +34478,33 @@ class TestClusterComplexTypes : public TestCommand nullableEnum8Argument.SetNonNull() = static_cast(255); return cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_95, OnFailureCallback_95); + nullableEnum8Argument, this, OnSuccessCallback_85, OnFailureCallback_85); } - void OnFailureResponse_95(uint8_t status) { NextTest(); } + void OnFailureResponse_85(uint8_t status) { NextTest(); } - void OnSuccessResponse_95() { ThrowSuccessResponse(); } + void OnSuccessResponse_85() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_96() + CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_86() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_96, OnFailureCallback_96); + this, OnSuccessCallback_86, OnFailureCallback_86); } - void OnFailureResponse_96(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_86(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_96(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_86(const chip::app::DataModel::Nullable & nullableEnum8) { VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_97() + CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_87() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34525,32 +34514,32 @@ class TestClusterComplexTypes : public TestCommand nullableEnum8Argument.SetNull(); return cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_97, OnFailureCallback_97); + nullableEnum8Argument, this, OnSuccessCallback_87, OnFailureCallback_87); } - void OnFailureResponse_97(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_87(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_97() { NextTest(); } + void OnSuccessResponse_87() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8NullValue_98() + CHIP_ERROR TestReadAttributeNullableEnum8NullValue_88() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_98, OnFailureCallback_98); + this, OnSuccessCallback_88, OnFailureCallback_88); } - void OnFailureResponse_98(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_88(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_98(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_88(const chip::app::DataModel::Nullable & nullableEnum8) { VerifyOrReturn(CheckValueNull("nullableEnum8", nullableEnum8)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_99() + CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_89() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34560,33 +34549,33 @@ class TestClusterComplexTypes : public TestCommand nullableEnum16Argument.SetNonNull() = static_cast(65534); return cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_99, OnFailureCallback_99); + nullableEnum16Argument, this, OnSuccessCallback_89, OnFailureCallback_89); } - void OnFailureResponse_99(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_89(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_99() { NextTest(); } + void OnSuccessResponse_89() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_100() + CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_90() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_100, OnFailureCallback_100); + this, OnSuccessCallback_90, OnFailureCallback_90); } - void OnFailureResponse_100(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_90(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_100(const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_90(const chip::app::DataModel::Nullable & nullableEnum16) { VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_101() + CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_91() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34596,33 +34585,33 @@ class TestClusterComplexTypes : public TestCommand nullableEnum16Argument.SetNonNull() = static_cast(65535); return cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_101, OnFailureCallback_101); + nullableEnum16Argument, this, OnSuccessCallback_91, OnFailureCallback_91); } - void OnFailureResponse_101(uint8_t status) { NextTest(); } + void OnFailureResponse_91(uint8_t status) { NextTest(); } - void OnSuccessResponse_101() { ThrowSuccessResponse(); } + void OnSuccessResponse_91() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_102() + CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_92() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_102, OnFailureCallback_102); + this, OnSuccessCallback_92, OnFailureCallback_92); } - void OnFailureResponse_102(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_92(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_102(const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_92(const chip::app::DataModel::Nullable & nullableEnum16) { VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_103() + CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_93() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34632,44 +34621,44 @@ class TestClusterComplexTypes : public TestCommand nullableEnum16Argument.SetNull(); return cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_103, OnFailureCallback_103); + nullableEnum16Argument, this, OnSuccessCallback_93, OnFailureCallback_93); } - void OnFailureResponse_103(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_93(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_103() { NextTest(); } + void OnSuccessResponse_93() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum16NullValue_104() + CHIP_ERROR TestReadAttributeNullableEnum16NullValue_94() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_104, OnFailureCallback_104); + this, OnSuccessCallback_94, OnFailureCallback_94); } - void OnFailureResponse_104(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_94(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_104(const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_94(const chip::app::DataModel::Nullable & nullableEnum16) { VerifyOrReturn(CheckValueNull("nullableEnum16", nullableEnum16)); NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_105() + CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_95() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_105, OnFailureCallback_105); + this, OnSuccessCallback_95, OnFailureCallback_95); } - void OnFailureResponse_105(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_95(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_105(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_95(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), @@ -34677,7 +34666,7 @@ class TestClusterComplexTypes : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_106() + CHIP_ERROR TestWriteAttributeNullableOctetString_96() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34688,26 +34677,26 @@ class TestClusterComplexTypes : public TestCommand chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); return cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_106, OnFailureCallback_106); + nullableOctetStringArgument, this, OnSuccessCallback_96, OnFailureCallback_96); } - void OnFailureResponse_106(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_96(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_106() { NextTest(); } + void OnSuccessResponse_96() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_107() + CHIP_ERROR TestReadAttributeNullableOctetString_97() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_107, OnFailureCallback_107); + this, OnSuccessCallback_97, OnFailureCallback_97); } - void OnFailureResponse_107(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_97(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_107(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_97(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), @@ -34715,7 +34704,7 @@ class TestClusterComplexTypes : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_108() + CHIP_ERROR TestWriteAttributeNullableOctetString_98() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34725,32 +34714,32 @@ class TestClusterComplexTypes : public TestCommand nullableOctetStringArgument.SetNull(); return cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_108, OnFailureCallback_108); + nullableOctetStringArgument, this, OnSuccessCallback_98, OnFailureCallback_98); } - void OnFailureResponse_108(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_98(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_108() { NextTest(); } + void OnSuccessResponse_98() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_109() + CHIP_ERROR TestReadAttributeNullableOctetString_99() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_109, OnFailureCallback_109); + this, OnSuccessCallback_99, OnFailureCallback_99); } - void OnFailureResponse_109(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_99(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_109(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_99(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNull("nullableOctetString", nullableOctetString)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_110() + CHIP_ERROR TestWriteAttributeNullableOctetString_100() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34761,26 +34750,26 @@ class TestClusterComplexTypes : public TestCommand chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); return cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_110, OnFailureCallback_110); + nullableOctetStringArgument, this, OnSuccessCallback_100, OnFailureCallback_100); } - void OnFailureResponse_110(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_100(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_110() { NextTest(); } + void OnSuccessResponse_100() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_111() + CHIP_ERROR TestReadAttributeNullableOctetString_101() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_111, OnFailureCallback_111); + this, OnSuccessCallback_101, OnFailureCallback_101); } - void OnFailureResponse_111(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_101(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_111(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_101(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), @@ -34788,26 +34777,26 @@ class TestClusterComplexTypes : public TestCommand NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_112() + CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_102() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_112, OnFailureCallback_112); + this, OnSuccessCallback_102, OnFailureCallback_102); } - void OnFailureResponse_112(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_102(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_112(const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_102(const chip::app::DataModel::Nullable & nullableCharString) { VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0))); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableCharString_113() + CHIP_ERROR TestWriteAttributeNullableCharString_103() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34817,14 +34806,14 @@ class TestClusterComplexTypes : public TestCommand nullableCharStringArgument.SetNonNull() = chip::Span("☉T☉garbage: not in length on purpose", 3); return cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_113, OnFailureCallback_113); + nullableCharStringArgument, this, OnSuccessCallback_103, OnFailureCallback_103); } - void OnFailureResponse_113(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_103(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_113() { NextTest(); } + void OnSuccessResponse_103() { NextTest(); } - CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_114() + CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_104() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34834,32 +34823,32 @@ class TestClusterComplexTypes : public TestCommand nullableCharStringArgument.SetNull(); return cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_114, OnFailureCallback_114); + nullableCharStringArgument, this, OnSuccessCallback_104, OnFailureCallback_104); } - void OnFailureResponse_114(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_104(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_114() { NextTest(); } + void OnSuccessResponse_104() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharString_115() + CHIP_ERROR TestReadAttributeNullableCharString_105() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_115, OnFailureCallback_115); + this, OnSuccessCallback_105, OnFailureCallback_105); } - void OnFailureResponse_115(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_105(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_115(const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_105(const chip::app::DataModel::Nullable & nullableCharString) { VerifyOrReturn(CheckValueNull("nullableCharString", nullableCharString)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_116() + CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_106() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -34869,26 +34858,26 @@ class TestClusterComplexTypes : public TestCommand nullableCharStringArgument.SetNonNull() = chip::Span("garbage: not in length on purpose", 0); return cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_116, OnFailureCallback_116); + nullableCharStringArgument, this, OnSuccessCallback_106, OnFailureCallback_106); } - void OnFailureResponse_116(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_106(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_116() { NextTest(); } + void OnSuccessResponse_106() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharString_117() + CHIP_ERROR TestReadAttributeNullableCharString_107() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_117, OnFailureCallback_117); + this, OnSuccessCallback_107, OnFailureCallback_107); } - void OnFailureResponse_117(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_107(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_117(const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_107(const chip::app::DataModel::Nullable & nullableCharString) { VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0)));