From ac107d4bc8b22bce5e9673d06552c4f449da0aec Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 4 Nov 2021 11:44:48 -0400 Subject: [PATCH] Add tests for nullable attributes. --- .../all-clusters-common/all-clusters-app.zap | 274 +- .../tests/suites/TestClusterComplexTypes.yaml | 680 +++ .../zcl/data-model/chip/test-cluster.xml | 28 + .../data_model/controller-clusters.zap | 255 + .../java/zap-generated/CHIPClusters-JNI.cpp | 531 +++ .../zap-generated/CHIPClustersRead-JNI.cpp | 514 ++ .../chip/devicecontroller/ChipClusters.java | 238 + .../python/chip/clusters/CHIPClusters.cpp | 346 ++ .../python/chip/clusters/CHIPClusters.py | 341 ++ .../python/chip/clusters/Objects.py | 221 + .../CHIP/zap-generated/CHIPClustersObjc.h | 51 + .../CHIP/zap-generated/CHIPClustersObjc.mm | 238 + .../zap-generated/endpoint_config.h | 122 +- .../app-common/zap-generated/attribute-id.h | 17 + .../zap-generated/attributes/Accessors.cpp | 786 ++++ .../zap-generated/attributes/Accessors.h | 119 + .../zap-generated/cluster-objects.h | 187 + .../app-common/zap-generated/ids/Attributes.h | 68 + .../zap-generated/cluster/Commands.h | 1190 +++++ .../chip-tool/zap-generated/test/Commands.h | 4180 ++++++++++++++--- .../zap-generated/CHIPClusters.cpp | 374 ++ .../zap-generated/CHIPClusters.h | 51 + 22 files changed, 10142 insertions(+), 669 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index f1e980a8a0225f..90f48ce7e1de85 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1294,7 +1294,7 @@ "outgoing": 1 }, { - "name": "ApplyUpdateRequestResponse", + "name": "ApplyUpdateResponse", "code": 4, "mfgCode": null, "source": "server", @@ -8380,7 +8380,7 @@ "outgoing": 1 }, { - "name": "ApplyUpdateRequestResponse", + "name": "ApplyUpdateResponse", "code": 4, "mfgCode": null, "source": "server", @@ -15636,6 +15636,276 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "unsupported", + "code": 255, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_boolean", + "code": 32768, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_bitmap8", + "code": 32769, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_bitmap16", + "code": 32770, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_bitmap32", + "code": 32771, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_bitmap64", + "code": 32772, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int8u", + "code": 32773, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int16u", + "code": 32774, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int32u", + "code": 32776, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int64u", + "code": 32780, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int8s", + "code": 32781, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int16s", + "code": 32782, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int32s", + "code": 32784, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int64s", + "code": 32788, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_enum8", + "code": 32789, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_enum16", + "code": 32790, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_octet_string", + "code": 32793, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_char_string", + "code": 32798, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/src/app/tests/suites/TestClusterComplexTypes.yaml b/src/app/tests/suites/TestClusterComplexTypes.yaml index 8241a66258ba69..522ec7d4803d4b 100644 --- a/src/app/tests/suites/TestClusterComplexTypes.yaml +++ b/src/app/tests/suites/TestClusterComplexTypes.yaml @@ -479,3 +479,683 @@ tests: value: true - name: "originalValue" value: null + + # Nullable attributes + + # Tests for nullable Boolean attribute + + - label: "Write attribute NULLABLE_BOOLEAN null" + command: "writeAttribute" + attribute: "nullable_boolean" + arguments: + value: null + + - label: "Read attribute NULLABLE_BOOLEAN null" + command: "readAttribute" + attribute: "nullable_boolean" + response: + value: null + + - label: "Write attribute NULLABLE_BOOLEAN True" + command: "writeAttribute" + attribute: "nullable_boolean" + arguments: + value: true + + - label: "Read attribute NULLABLE_BOOLEAN True" + command: "readAttribute" + attribute: "nullable_boolean" + response: + value: true + + # Tests for nullable Bitmap8 attribute + + - label: "Write attribute NULLABLE_BITMAP8 Max Value" + command: "writeAttribute" + attribute: "nullable_bitmap8" + arguments: + value: 254 + + - label: "Read attribute NULLABLE_BITMAP8 Max Value" + command: "readAttribute" + attribute: "nullable_bitmap8" + response: + value: 254 + + - label: "Write attribute NULLABLE_BITMAP8 Invalid Value" + command: "writeAttribute" + attribute: "nullable_bitmap8" + arguments: + value: 255 + response: + error: 1 + + - label: "Read attribute NULLABLE_BITMAP8 unchanged Value" + command: "readAttribute" + attribute: "nullable_bitmap8" + response: + value: 254 + + - label: "Write attribute NULLABLE_BITMAP8 null Value" + command: "writeAttribute" + attribute: "nullable_bitmap8" + arguments: + value: null + + - label: "Read attribute NULLABLE_BITMAP8 null Value" + command: "readAttribute" + attribute: "nullable_bitmap8" + response: + value: null + + # Tests for nullable Bitmap16 attribute + + - label: "Write attribute NULLABLE_BITMAP16 Max Value" + command: "writeAttribute" + attribute: "nullable_bitmap16" + arguments: + value: 65534 + + - label: "Read attribute NULLABLE_BITMAP16 Max Value" + command: "readAttribute" + attribute: "nullable_bitmap16" + response: + value: 65534 + + - label: "Write attribute NULLABLE_BITMAP16 Invalid Value" + command: "writeAttribute" + attribute: "nullable_bitmap16" + arguments: + value: 65535 + response: + error: 1 + + - label: "Read attribute NULLABLE_BITMAP16 unchanged Value" + command: "readAttribute" + attribute: "nullable_bitmap16" + response: + value: 65534 + + - label: "Write attribute NULLABLE_BITMAP16 null Value" + command: "writeAttribute" + attribute: "nullable_bitmap16" + arguments: + value: null + + - label: "Read attribute NULLABLE_BITMAP16 null Value" + command: "readAttribute" + attribute: "nullable_bitmap16" + response: + value: null + + # Tests for nullable Bitmap32 attribute + + - label: "Write attribute NULLABLE_BITMAP32 Max Value" + command: "writeAttribute" + attribute: "nullable_bitmap32" + arguments: + value: 4294967294 + + - label: "Read attribute NULLABLE_BITMAP32 Max Value" + command: "readAttribute" + attribute: "nullable_bitmap32" + response: + value: 4294967294 + + - label: "Write attribute NULLABLE_BITMAP32 Invalid Value" + command: "writeAttribute" + attribute: "nullable_bitmap32" + arguments: + value: 4294967295 + response: + error: 1 + + - label: "Read attribute NULLABLE_BITMAP32 unchanged Value" + command: "readAttribute" + attribute: "nullable_bitmap32" + response: + value: 4294967294 + + - label: "Write attribute NULLABLE_BITMAP32 null Value" + command: "writeAttribute" + attribute: "nullable_bitmap32" + arguments: + value: null + + - label: "Read attribute NULLABLE_BITMAP32 null Value" + command: "readAttribute" + attribute: "nullable_bitmap32" + response: + value: null + + # Tests for nullable Bitmap64 attribute + + - label: "Write attribute NULLABLE_BITMAP64 Max Value" + command: "writeAttribute" + attribute: "nullable_bitmap64" + arguments: + value: "18446744073709551614" + + - label: "Read attribute NULLABLE_BITMAP64 Max Value" + command: "readAttribute" + attribute: "nullable_bitmap64" + response: + value: "18446744073709551614" + + - label: "Write attribute NULLABLE_BITMAP64 Invalid Value" + command: "writeAttribute" + attribute: "nullable_bitmap64" + arguments: + value: "18446744073709551615" + response: + error: 1 + + - label: "Read attribute NULLABLE_BITMAP64 unchanged Value" + command: "readAttribute" + attribute: "nullable_bitmap64" + response: + value: "18446744073709551614" + + - label: "Write attribute NULLABLE_BITMAP64 null Value" + command: "writeAttribute" + attribute: "nullable_bitmap64" + arguments: + value: null + + - label: "Read attribute NULLABLE_BITMAP64 null Value" + command: "readAttribute" + attribute: "nullable_bitmap64" + response: + value: null + + # Tests for UInt8 attribute + + - label: "Write attribute NULLABLE_INT8U Max Value" + command: "writeAttribute" + attribute: "nullable_int8u" + arguments: + value: 254 + + - label: "Read attribute NULLABLE_INT8U Max Value" + command: "readAttribute" + attribute: "nullable_int8u" + response: + value: 254 + + - label: "Write attribute NULLABLE_INT8U Invalid Value" + command: "writeAttribute" + attribute: "nullable_int8u" + arguments: + value: 255 + response: + error: 1 + + - label: "Read attribute NULLABLE_INT8U unchanged Value" + command: "readAttribute" + attribute: "nullable_int8u" + response: + value: 254 + + - label: "Write attribute NULLABLE_INT8U null Value" + command: "writeAttribute" + attribute: "nullable_int8u" + arguments: + value: null + + - label: "Read attribute NULLABLE_INT8U null Value" + command: "readAttribute" + attribute: "nullable_int8u" + response: + value: null + + # Tests for UInt16 attribute + + - label: "Write attribute NULLABLE_INT16U Max Value" + command: "writeAttribute" + attribute: "nullable_int16u" + arguments: + value: 65534 + + - label: "Read attribute NULLABLE_INT16U Max Value" + command: "readAttribute" + attribute: "nullable_int16u" + response: + value: 65534 + + - label: "Write attribute NULLABLE_INT16U Invalid Value" + command: "writeAttribute" + attribute: "nullable_int16u" + arguments: + value: 65535 + response: + error: 1 + + - label: "Read attribute NULLABLE_INT16U unchanged Value" + command: "readAttribute" + attribute: "nullable_int16u" + response: + value: 65534 + + - label: "Write attribute NULLABLE_INT16U null Value" + command: "writeAttribute" + attribute: "nullable_int16u" + arguments: + value: null + + - label: "Read attribute NULLABLE_INT16U null Value" + command: "readAttribute" + attribute: "nullable_int16u" + response: + value: null + + # Tests for UInt32 attribute + + - label: "Write attribute NULLABLE_INT32U Max Value" + command: "writeAttribute" + attribute: "nullable_int32u" + arguments: + value: 4294967294 + + - label: "Read attribute NULLABLE_INT32U Max Value" + command: "readAttribute" + attribute: "nullable_int32u" + response: + value: 4294967294 + + - label: "Write attribute NULLABLE_INT32U Invalid Value" + command: "writeAttribute" + attribute: "nullable_int32u" + arguments: + value: 4294967295 + response: + error: 1 + + - label: "Read attribute NULLABLE_INT32U unchanged Value" + command: "readAttribute" + attribute: "nullable_int32u" + response: + value: 4294967294 + + - label: "Write attribute NULLABLE_INT32U null Value" + command: "writeAttribute" + attribute: "nullable_int32u" + arguments: + value: null + + - label: "Read attribute NULLABLE_INT32U null Value" + command: "readAttribute" + attribute: "nullable_int32u" + response: + value: null + + # Tests for UInt64 attribute + + - label: "Write attribute NULLABLE_INT64U Max Value" + command: "writeAttribute" + attribute: "nullable_int64u" + arguments: + value: "18446744073709551614" + + - label: "Read attribute NULLABLE_INT64U Max Value" + command: "readAttribute" + attribute: "nullable_int64u" + response: + value: "18446744073709551614" + + - label: "Write attribute NULLABLE_INT64U Invalid Value" + command: "writeAttribute" + attribute: "nullable_int64u" + arguments: + value: "18446744073709551615" + response: + error: 1 + + - label: "Read attribute NULLABLE_INT64U unchanged Value" + command: "readAttribute" + attribute: "nullable_int64u" + response: + value: "18446744073709551614" + + - label: "Write attribute NULLABLE_INT64U null Value" + command: "writeAttribute" + attribute: "nullable_int64u" + arguments: + value: null + + - label: "Read attribute NULLABLE_INT64U null Value" + command: "readAttribute" + attribute: "nullable_int64u" + response: + value: null + + # Tests for Int8 attribute + + - label: "Write attribute NULLABLE_INT8S Min Value" + command: "writeAttribute" + attribute: "nullable_int8s" + arguments: + value: -127 + + - label: "Read attribute NULLABLE_INT8S Min Value" + command: "readAttribute" + attribute: "nullable_int8s" + response: + value: -127 + + - label: "Write attribute NULLABLE_INT8S Invalid Value" + command: "writeAttribute" + attribute: "nullable_int8s" + arguments: + value: -128 + response: + error: 1 + + - label: "Read attribute NULLABLE_INT8S unchanged Value" + command: "readAttribute" + attribute: "nullable_int8s" + response: + value: -127 + + - label: "Write attribute NULLABLE_INT8S null Value" + command: "writeAttribute" + attribute: "nullable_int8s" + arguments: + value: null + + - label: "Read attribute NULLABLE_INT8S null Value" + command: "readAttribute" + attribute: "nullable_int8s" + response: + value: null + + # Tests for Int16 attribute + + - label: "Write attribute NULLABLE_INT16S Min Value" + command: "writeAttribute" + attribute: "nullable_int16s" + arguments: + value: -32767 + + - label: "Read attribute NULLABLE_INT16S Min Value" + command: "readAttribute" + attribute: "nullable_int16s" + response: + value: -32767 + + - label: "Write attribute NULLABLE_INT16S Invalid Value" + command: "writeAttribute" + attribute: "nullable_int16s" + arguments: + value: -32768 + response: + error: 1 + + - label: "Read attribute NULLABLE_INT16S unchanged Value" + command: "readAttribute" + attribute: "nullable_int16s" + response: + value: -32767 + + - label: "Write attribute NULLABLE_INT16S null Value" + command: "writeAttribute" + attribute: "nullable_int16s" + arguments: + value: null + + - label: "Read attribute NULLABLE_INT16S null Value" + command: "readAttribute" + attribute: "nullable_int16s" + response: + value: null + + # Tests for Int32 attribute + + - label: "Write attribute NULLABLE_INT32S Min Value" + command: "writeAttribute" + attribute: "nullable_int32s" + arguments: + value: -2147483647 + + - label: "Read attribute NULLABLE_INT32S Min Value" + command: "readAttribute" + attribute: "nullable_int32s" + response: + value: -2147483647 + + - label: "Write attribute NULLABLE_INT32S Invalid Value" + command: "writeAttribute" + attribute: "nullable_int32s" + arguments: + value: -2147483648 + response: + error: 1 + + - label: "Read attribute NULLABLE_INT32S unchanged Value" + command: "readAttribute" + attribute: "nullable_int32s" + response: + value: -2147483647 + + - label: "Write attribute NULLABLE_INT32S null Value" + command: "writeAttribute" + attribute: "nullable_int32s" + arguments: + value: null + + - label: "Read attribute NULLABLE_INT32S null Value" + command: "readAttribute" + attribute: "nullable_int32s" + response: + value: null + + # Tests for Int64 attribute + + - label: "Write attribute NULLABLE_INT64S Min Value" + command: "writeAttribute" + attribute: "nullable_int64s" + arguments: + value: "-9223372036854775807" + + - label: "Read attribute NULLABLE_INT64S Min Value" + command: "readAttribute" + attribute: "nullable_int64s" + response: + value: "-9223372036854775807" + + - label: "Write attribute NULLABLE_INT64S Invalid Value" + command: "writeAttribute" + attribute: "nullable_int64s" + arguments: + # This is a nasty hack: -9223372036854775808 is not a valid way to + # write a long long in C++, leading to warnings. So this tries to + # work around that. + value: "-9223372036854775807LL - 1" + response: + error: 1 + + - label: "Read attribute NULLABLE_INT64S unchanged Value" + command: "readAttribute" + attribute: "nullable_int64s" + response: + value: "-9223372036854775807" + + - label: "Write attribute NULLABLE_INT64S null Value" + command: "writeAttribute" + attribute: "nullable_int64s" + arguments: + value: null + + - label: "Read attribute NULLABLE_INT64S null Value" + command: "readAttribute" + attribute: "nullable_int64s" + response: + value: null + + # Tests for Enum8 attribute + + - label: "Write attribute NULLABLE_ENUM8 Max Value" + command: "writeAttribute" + attribute: "nullable_enum8" + arguments: + value: 254 + + - label: "Read attribute NULLABLE_ENUM8 Max Value" + command: "readAttribute" + attribute: "nullable_enum8" + response: + value: 254 + + - label: "Write attribute NULLABLE_ENUM8 Invalid Value" + command: "writeAttribute" + attribute: "nullable_enum8" + arguments: + value: 255 + response: + error: 1 + + - label: "Read attribute NULLABLE_ENUM8 unchanged Value" + command: "readAttribute" + attribute: "nullable_enum8" + response: + value: 254 + + - label: "Write attribute NULLABLE_ENUM8 null Value" + command: "writeAttribute" + attribute: "nullable_enum8" + arguments: + value: null + + - label: "Read attribute NULLABLE_ENUM8 null Value" + command: "readAttribute" + attribute: "nullable_enum8" + response: + value: null + + # Tests for Enum16 attribute + + - label: "Write attribute NULLABLE_ENUM16 Max Value" + command: "writeAttribute" + attribute: "nullable_enum16" + arguments: + value: 65534 + + - label: "Read attribute NULLABLE_ENUM16 Max Value" + command: "readAttribute" + attribute: "nullable_enum16" + response: + value: 65534 + + - label: "Write attribute NULLABLE_ENUM16 Invalid Value" + command: "writeAttribute" + attribute: "nullable_enum16" + arguments: + value: 65535 + response: + error: 1 + + - label: "Read attribute NULLABLE_ENUM16 unchanged Value" + command: "readAttribute" + attribute: "nullable_enum16" + response: + value: 65534 + + - label: "Write attribute NULLABLE_ENUM16 null Value" + command: "writeAttribute" + attribute: "nullable_enum16" + arguments: + value: null + + - label: "Read attribute NULLABLE_ENUM16 null Value" + command: "readAttribute" + attribute: "nullable_enum16" + response: + value: null + + # Tests for Octet String attribute + + - label: "Read attribute NULLABLE_OCTET_STRING Default Value" + command: "readAttribute" + attribute: "nullable_octet_string" + response: + value: "" + + - label: "Write attribute NULLABLE_OCTET_STRING" + command: "writeAttribute" + attribute: "nullable_octet_string" + arguments: + value: "TestValue" + + - label: "Read attribute NULLABLE_OCTET_STRING" + command: "readAttribute" + attribute: "nullable_octet_string" + response: + value: "TestValue" + + - label: "Write attribute NULLABLE_OCTET_STRING" + command: "writeAttribute" + attribute: "nullable_octet_string" + arguments: + value: null + + - label: "Read attribute NULLABLE_OCTET_STRING" + command: "readAttribute" + attribute: "nullable_octet_string" + response: + value: null + + - label: "Write attribute NULLABLE_OCTET_STRING" + command: "writeAttribute" + attribute: "nullable_octet_string" + arguments: + value: "" + + - label: "Read attribute NULLABLE_OCTET_STRING" + command: "readAttribute" + attribute: "nullable_octet_string" + response: + value: "" + + # Tests for Char String attribute + + - label: "Read attribute NULLABLE_CHAR_STRING Default Value" + command: "readAttribute" + attribute: "nullable_char_string" + response: + value: "" + + - label: "Write attribute NULLABLE_CHAR_STRING" + command: "writeAttribute" + attribute: "nullable_char_string" + arguments: + value: "☉T☉" + + - label: "Read attribute NULLABLE_CHAR_STRING" + command: "readAttribute" + attribute: "nullable_char_string" + disabled: true + response: + value: "☉T☉" + + - label: "Write attribute NULLABLE_CHAR_STRING - Value too long" + command: "writeAttribute" + attribute: "nullable_char_string" + arguments: + value: null + + - label: "Read attribute NULLABLE_CHAR_STRING" + command: "readAttribute" + attribute: "nullable_char_string" + response: + value: null + + - label: "Write attribute NULLABLE_CHAR_STRING - Empty" + command: "writeAttribute" + attribute: "nullable_char_string" + arguments: + value: "" + + - label: "Read attribute NULLABLE_CHAR_STRING" + command: "readAttribute" + attribute: "nullable_char_string" + response: + value: "" diff --git a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml index f9967fd5f1c3da..64b229ef1f5799 100644 --- a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml @@ -141,6 +141,34 @@ limitations under the License. attribute types in ZAP --> + nullable_boolean + nullable_bitmap8 + nullable_bitmap16 + nullable_bitmap32 + nullable_bitmap64 + nullable_int8u + nullable_int16u + + nullable_int32u + + + + nullable_int64u + nullable_int8s + nullable_int16s + + nullable_int32s + + + + nullable_int64s + nullable_enum8 + nullable_enum16 + + + nullable_octet_string + nullable_char_string + unsupported diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 735732b7f995e9..0b745aa3113989 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -11880,6 +11880,261 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "nullable_boolean", + "code": 32768, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_bitmap8", + "code": 32769, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_bitmap16", + "code": 32770, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_bitmap32", + "code": 32771, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_bitmap64", + "code": 32772, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int8u", + "code": 32773, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int16u", + "code": 32774, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int32u", + "code": 32776, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int64u", + "code": 32780, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int8s", + "code": 32781, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int16s", + "code": 32782, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int32s", + "code": 32784, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int64s", + "code": 32788, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_enum8", + "code": 32789, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_enum16", + "code": 32790, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_octet_string", + "code": 32793, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_char_string", + "code": 32798, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 6e0e2defc8b83b..d864242bd2721e 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -16925,6 +16925,537 @@ JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute) onSuccess.release(); onFailure.release(); } + +JNI_METHOD(void, TestClusterCluster, writeNullableBooleanAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jboolean value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableBoolean(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableBitmap8Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableBitmap8(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableBitmap16Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableBitmap16(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableBitmap32Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jlong value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableBitmap32(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableBitmap64Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jlong value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableBitmap64(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableInt8uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableInt8u(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableInt16uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableInt16u(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableInt32uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jlong value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableInt32u(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableInt64uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jlong value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableInt64u(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableInt8sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableInt8s(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableInt16sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableInt16s(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableInt32sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jlong value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableInt32s(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableInt64sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jlong value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableInt64s(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableEnum8Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableEnum8(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableEnum16Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeNullableEnum16(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + JniByteArray jniArr(env, value); + err = cppCluster->WriteAttributeNullableOctetString(onSuccess->Cancel(), onFailure->Cancel(), + chip::ByteSpan((const uint8_t *) jniArr.data(), jniArr.size())); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + JniUtfString valueStr(env, value); + err = cppCluster->WriteAttributeNullableCharString(onSuccess->Cancel(), onFailure->Cancel(), + chip::CharSpan(valueStr.c_str(), strlen(valueStr.c_str()))); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(jlong, ThermostatCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index cb8d29868fa139..a2bfb3cd2b01eb 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -10671,6 +10671,520 @@ JNI_METHOD(void, TestClusterCluster, readUnsupportedAttribute)(JNIEnv * env, job onFailure.release(); } +JNI_METHOD(void, TestClusterCluster, readNullableBooleanAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableBoolean(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableBitmap8Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableBitmap8(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableBitmap16Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableBitmap16(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableBitmap32Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableBitmap32(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableBitmap64Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableBitmap64(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableInt8uAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableInt8u(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableInt16uAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableInt16u(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableInt32uAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableInt32u(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableInt64uAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableInt64u(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableInt8sAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableInt8s(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableInt16sAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableInt16s(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableInt32sAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableInt32s(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableInt64sAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableInt64s(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableEnum8Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableEnum8(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableEnum16Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableEnum16(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableOctetString(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, readNullableCharStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeNullableCharString(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, TestClusterCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 6f5df3b2596994..b65c21be15754d 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -6415,6 +6415,142 @@ public void writeUnsupportedAttribute(DefaultClusterCallback callback, boolean v writeUnsupportedAttribute(chipClusterPtr, callback, value); } + public void readNullableBooleanAttribute(BooleanAttributeCallback callback) { + readNullableBooleanAttribute(chipClusterPtr, callback); + } + + public void writeNullableBooleanAttribute(DefaultClusterCallback callback, boolean value) { + writeNullableBooleanAttribute(chipClusterPtr, callback, value); + } + + public void readNullableBitmap8Attribute(IntegerAttributeCallback callback) { + readNullableBitmap8Attribute(chipClusterPtr, callback); + } + + public void writeNullableBitmap8Attribute(DefaultClusterCallback callback, int value) { + writeNullableBitmap8Attribute(chipClusterPtr, callback, value); + } + + public void readNullableBitmap16Attribute(IntegerAttributeCallback callback) { + readNullableBitmap16Attribute(chipClusterPtr, callback); + } + + public void writeNullableBitmap16Attribute(DefaultClusterCallback callback, int value) { + writeNullableBitmap16Attribute(chipClusterPtr, callback, value); + } + + public void readNullableBitmap32Attribute(LongAttributeCallback callback) { + readNullableBitmap32Attribute(chipClusterPtr, callback); + } + + public void writeNullableBitmap32Attribute(DefaultClusterCallback callback, long value) { + writeNullableBitmap32Attribute(chipClusterPtr, callback, value); + } + + public void readNullableBitmap64Attribute(LongAttributeCallback callback) { + readNullableBitmap64Attribute(chipClusterPtr, callback); + } + + public void writeNullableBitmap64Attribute(DefaultClusterCallback callback, long value) { + writeNullableBitmap64Attribute(chipClusterPtr, callback, value); + } + + public void readNullableInt8uAttribute(IntegerAttributeCallback callback) { + readNullableInt8uAttribute(chipClusterPtr, callback); + } + + public void writeNullableInt8uAttribute(DefaultClusterCallback callback, int value) { + writeNullableInt8uAttribute(chipClusterPtr, callback, value); + } + + public void readNullableInt16uAttribute(IntegerAttributeCallback callback) { + readNullableInt16uAttribute(chipClusterPtr, callback); + } + + public void writeNullableInt16uAttribute(DefaultClusterCallback callback, int value) { + writeNullableInt16uAttribute(chipClusterPtr, callback, value); + } + + public void readNullableInt32uAttribute(LongAttributeCallback callback) { + readNullableInt32uAttribute(chipClusterPtr, callback); + } + + public void writeNullableInt32uAttribute(DefaultClusterCallback callback, long value) { + writeNullableInt32uAttribute(chipClusterPtr, callback, value); + } + + public void readNullableInt64uAttribute(LongAttributeCallback callback) { + readNullableInt64uAttribute(chipClusterPtr, callback); + } + + public void writeNullableInt64uAttribute(DefaultClusterCallback callback, long value) { + writeNullableInt64uAttribute(chipClusterPtr, callback, value); + } + + public void readNullableInt8sAttribute(IntegerAttributeCallback callback) { + readNullableInt8sAttribute(chipClusterPtr, callback); + } + + public void writeNullableInt8sAttribute(DefaultClusterCallback callback, int value) { + writeNullableInt8sAttribute(chipClusterPtr, callback, value); + } + + public void readNullableInt16sAttribute(IntegerAttributeCallback callback) { + readNullableInt16sAttribute(chipClusterPtr, callback); + } + + public void writeNullableInt16sAttribute(DefaultClusterCallback callback, int value) { + writeNullableInt16sAttribute(chipClusterPtr, callback, value); + } + + public void readNullableInt32sAttribute(LongAttributeCallback callback) { + readNullableInt32sAttribute(chipClusterPtr, callback); + } + + public void writeNullableInt32sAttribute(DefaultClusterCallback callback, long value) { + writeNullableInt32sAttribute(chipClusterPtr, callback, value); + } + + public void readNullableInt64sAttribute(LongAttributeCallback callback) { + readNullableInt64sAttribute(chipClusterPtr, callback); + } + + public void writeNullableInt64sAttribute(DefaultClusterCallback callback, long value) { + writeNullableInt64sAttribute(chipClusterPtr, callback, value); + } + + public void readNullableEnum8Attribute(IntegerAttributeCallback callback) { + readNullableEnum8Attribute(chipClusterPtr, callback); + } + + public void writeNullableEnum8Attribute(DefaultClusterCallback callback, int value) { + writeNullableEnum8Attribute(chipClusterPtr, callback, value); + } + + public void readNullableEnum16Attribute(IntegerAttributeCallback callback) { + readNullableEnum16Attribute(chipClusterPtr, callback); + } + + public void writeNullableEnum16Attribute(DefaultClusterCallback callback, int value) { + writeNullableEnum16Attribute(chipClusterPtr, callback, value); + } + + public void readNullableOctetStringAttribute(OctetStringAttributeCallback callback) { + readNullableOctetStringAttribute(chipClusterPtr, callback); + } + + public void writeNullableOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { + writeNullableOctetStringAttribute(chipClusterPtr, callback, value); + } + + public void readNullableCharStringAttribute(CharStringAttributeCallback callback) { + readNullableCharStringAttribute(chipClusterPtr, callback); + } + + public void writeNullableCharStringAttribute(DefaultClusterCallback callback, String value) { + writeNullableCharStringAttribute(chipClusterPtr, callback, value); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -6555,6 +6691,108 @@ private native void readUnsupportedAttribute( private native void writeUnsupportedAttribute( long chipClusterPtr, DefaultClusterCallback callback, boolean value); + private native void readNullableBooleanAttribute( + long chipClusterPtr, BooleanAttributeCallback callback); + + private native void writeNullableBooleanAttribute( + long chipClusterPtr, DefaultClusterCallback callback, boolean value); + + private native void readNullableBitmap8Attribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeNullableBitmap8Attribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readNullableBitmap16Attribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeNullableBitmap16Attribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readNullableBitmap32Attribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void writeNullableBitmap32Attribute( + long chipClusterPtr, DefaultClusterCallback callback, long value); + + private native void readNullableBitmap64Attribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void writeNullableBitmap64Attribute( + long chipClusterPtr, DefaultClusterCallback callback, long value); + + private native void readNullableInt8uAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeNullableInt8uAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readNullableInt16uAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeNullableInt16uAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readNullableInt32uAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void writeNullableInt32uAttribute( + long chipClusterPtr, DefaultClusterCallback callback, long value); + + private native void readNullableInt64uAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void writeNullableInt64uAttribute( + long chipClusterPtr, DefaultClusterCallback callback, long value); + + private native void readNullableInt8sAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeNullableInt8sAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readNullableInt16sAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeNullableInt16sAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readNullableInt32sAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void writeNullableInt32sAttribute( + long chipClusterPtr, DefaultClusterCallback callback, long value); + + private native void readNullableInt64sAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void writeNullableInt64sAttribute( + long chipClusterPtr, DefaultClusterCallback callback, long value); + + private native void readNullableEnum8Attribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeNullableEnum8Attribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readNullableEnum16Attribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeNullableEnum16Attribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readNullableOctetStringAttribute( + long chipClusterPtr, OctetStringAttributeCallback callback); + + private native void writeNullableOctetStringAttribute( + long chipClusterPtr, DefaultClusterCallback callback, byte[] value); + + private native void readNullableCharStringAttribute( + long chipClusterPtr, CharStringAttributeCallback callback); + + private native void writeNullableCharStringAttribute( + long chipClusterPtr, DefaultClusterCallback callback, String value); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); } diff --git a/src/controller/python/chip/clusters/CHIPClusters.cpp b/src/controller/python/chip/clusters/CHIPClusters.cpp index 5d5d36eb9d97cb..bd89b5395caccd 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.cpp +++ b/src/controller/python/chip/clusters/CHIPClusters.cpp @@ -7794,6 +7794,352 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Unsupported(chi cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeUnsupported(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBoolean(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableBoolean(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + bool value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableBoolean(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap8(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableBitmap8(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint8_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableBitmap8(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap16(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableBitmap16(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableBitmap16(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap32(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableBitmap32(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint32_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableBitmap32(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap64(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableBitmap64(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint64_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableBitmap64(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt8u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableInt8u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint8_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableInt8u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt16u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableInt16u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableInt16u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt32u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableInt32u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint32_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableInt32u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt64u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableInt64u(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint64_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableInt64u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt8s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableInt8s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + int8_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableInt8s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt16s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableInt16s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + int16_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableInt16s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt32s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableInt32s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + int32_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableInt32s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt64s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableInt64s(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + int64_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableInt64s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableEnum8(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableEnum8(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint8_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableEnum8(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableEnum16(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableEnum16(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeNullableEnum16(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableOctetString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableOctetString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint8_t * value, size_t len) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .WriteAttributeNullableOctetString(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), + chip::ByteSpan(value, len)) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableCharString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeNullableCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_NullableCharString(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint8_t * value, size_t len) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .WriteAttributeNullableCharString(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), + chip::CharSpan(reinterpret_cast(value), len)) + .AsInteger(); +} chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 598db37a94a31c..bb30f874ffeecd 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3537,6 +3537,108 @@ class ChipClusters: "type": "bool", "writable": True, }, + 0x00008000: { + "attributeName": "NullableBoolean", + "attributeId": 0x00008000, + "type": "bool", + "writable": True, + }, + 0x00008001: { + "attributeName": "NullableBitmap8", + "attributeId": 0x00008001, + "type": "int", + "writable": True, + }, + 0x00008002: { + "attributeName": "NullableBitmap16", + "attributeId": 0x00008002, + "type": "int", + "writable": True, + }, + 0x00008003: { + "attributeName": "NullableBitmap32", + "attributeId": 0x00008003, + "type": "int", + "writable": True, + }, + 0x00008004: { + "attributeName": "NullableBitmap64", + "attributeId": 0x00008004, + "type": "int", + "writable": True, + }, + 0x00008005: { + "attributeName": "NullableInt8u", + "attributeId": 0x00008005, + "type": "int", + "writable": True, + }, + 0x00008006: { + "attributeName": "NullableInt16u", + "attributeId": 0x00008006, + "type": "int", + "writable": True, + }, + 0x00008008: { + "attributeName": "NullableInt32u", + "attributeId": 0x00008008, + "type": "int", + "writable": True, + }, + 0x0000800C: { + "attributeName": "NullableInt64u", + "attributeId": 0x0000800C, + "type": "int", + "writable": True, + }, + 0x0000800D: { + "attributeName": "NullableInt8s", + "attributeId": 0x0000800D, + "type": "int", + "writable": True, + }, + 0x0000800E: { + "attributeName": "NullableInt16s", + "attributeId": 0x0000800E, + "type": "int", + "writable": True, + }, + 0x00008010: { + "attributeName": "NullableInt32s", + "attributeId": 0x00008010, + "type": "int", + "writable": True, + }, + 0x00008014: { + "attributeName": "NullableInt64s", + "attributeId": 0x00008014, + "type": "int", + "writable": True, + }, + 0x00008015: { + "attributeName": "NullableEnum8", + "attributeId": 0x00008015, + "type": "int", + "writable": True, + }, + 0x00008016: { + "attributeName": "NullableEnum16", + "attributeId": 0x00008016, + "type": "int", + "writable": True, + }, + 0x00008019: { + "attributeName": "NullableOctetString", + "attributeId": 0x00008019, + "type": "bytes", + "writable": True, + }, + 0x0000801E: { + "attributeName": "NullableCharString", + "attributeId": 0x0000801E, + "type": "str", + "writable": True, + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -6703,6 +6805,109 @@ def ClusterTestCluster_ReadAttributeUnsupported(self, device: ctypes.c_void_p, Z def ClusterTestCluster_WriteAttributeUnsupported(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bool): return self._chipLib.chip_ime_WriteAttribute_TestCluster_Unsupported(device, ZCLendpoint, ZCLgroupid, value) + def ClusterTestCluster_ReadAttributeNullableBoolean(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBoolean(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableBoolean(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bool): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBoolean(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableBitmap8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap8(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableBitmap8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap8(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableBitmap16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap16(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableBitmap16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap16(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableBitmap32(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap32(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableBitmap32(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap32(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableBitmap64(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap64(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableBitmap64(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap64(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableInt8u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8u(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableInt8u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt8u(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableInt16u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16u(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableInt16u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt16u(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableInt32u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32u(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableInt32u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt32u(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableInt64u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64u(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableInt64u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt64u(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableInt8s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8s(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableInt8s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt8s(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableInt16s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16s(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableInt16s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt16s(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableInt32s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32s(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableInt32s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt32s(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableInt64s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64s(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableInt64s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt64s(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableEnum8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum8(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableEnum8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableEnum8(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableEnum16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum16(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableEnum16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableEnum16(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterTestCluster_ReadAttributeNullableOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableOctetString(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bytes): + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableOctetString(device, ZCLendpoint, ZCLgroupid, value, len(value)) + + def ClusterTestCluster_ReadAttributeNullableCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableCharString(device, ZCLendpoint, ZCLgroupid) + + def ClusterTestCluster_WriteAttributeNullableCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: str): + value = value.encode("utf-8") + return self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableCharString(device, ZCLendpoint, ZCLgroupid, value, len(value)) + def ClusterTestCluster_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_TestCluster_ClusterRevision(device, ZCLendpoint, ZCLgroupid) @@ -9535,6 +9740,142 @@ def InitLib(self, chipLib): self._chipLib.chip_ime_WriteAttribute_TestCluster_Unsupported.argtypes = [ ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_bool] self._chipLib.chip_ime_WriteAttribute_TestCluster_Unsupported.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableBoolean + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBoolean.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBoolean.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableBoolean + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBoolean.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_bool] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBoolean.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableBitmap8 + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap8.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap8.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableBitmap8 + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap8.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap8.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableBitmap16 + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap16.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap16.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableBitmap16 + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap16.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap16.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableBitmap32 + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap32.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap32.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableBitmap32 + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap32.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint32] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap32.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableBitmap64 + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap64.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap64.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableBitmap64 + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap64.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint64] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableBitmap64.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableInt8u + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8u.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8u.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableInt8u + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt8u.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt8u.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableInt16u + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16u.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16u.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableInt16u + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt16u.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt16u.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableInt32u + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32u.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32u.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableInt32u + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt32u.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint32] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt32u.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableInt64u + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64u.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64u.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableInt64u + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt64u.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint64] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt64u.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableInt8s + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8s.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8s.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableInt8s + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt8s.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int8] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt8s.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableInt16s + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16s.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16s.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableInt16s + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt16s.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int16] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt16s.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableInt32s + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32s.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32s.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableInt32s + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt32s.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int32] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt32s.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableInt64s + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64s.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64s.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableInt64s + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt64s.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int64] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableInt64s.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableEnum8 + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum8.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum8.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableEnum8 + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableEnum8.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableEnum8.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableEnum16 + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum16.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum16.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableEnum16 + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableEnum16.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableEnum16.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableOctetString + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableOctetString.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableOctetString.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableOctetString + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableOctetString.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableOctetString.restype = ctypes.c_uint32 + # Cluster TestCluster ReadAttribute NullableCharString + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableCharString.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableCharString.restype = ctypes.c_uint32 + # Cluster TestCluster WriteAttribute NullableCharString + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableCharString.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32] + self._chipLib.chip_ime_WriteAttribute_TestCluster_NullableCharString.restype = ctypes.c_uint32 # Cluster TestCluster ReadAttribute ClusterRevision self._chipLib.chip_ime_ReadAttribute_TestCluster_ClusterRevision.argtypes = [ ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index c123dc32c29de7..011d4d6ce7a287 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -21686,6 +21686,227 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) + class NullableBoolean(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=bool) + + class NullableBitmap8(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + class NullableBitmap16(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + class NullableBitmap32(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + class NullableBitmap64(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + class NullableInt8u(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + class NullableInt16u(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + class NullableInt32u(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8008 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + class NullableInt64u(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x800C + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + class NullableInt8s(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x800D + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=int) + + class NullableInt16s(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x800E + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=int) + + class NullableInt32s(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8010 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=int) + + class NullableInt64s(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8014 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=int) + + class NullableEnum8(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8015 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + class NullableEnum16(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8016 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + class NullableOctetString(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x8019 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=bytes) + + class NullableCharString(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x801E + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 4b61fbbaeaa1f0..481694485dab50 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -1704,6 +1704,57 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeUnsupportedWithResponseHandler:(ResponseHandler)responseHandler; - (void)writeAttributeUnsupportedWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeNullableBooleanWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableBooleanWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableBitmap8WithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableBitmap8WithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableBitmap16WithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableBitmap16WithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableBitmap32WithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableBitmap32WithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableBitmap64WithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableBitmap64WithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableInt8uWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableInt8uWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableInt16uWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableInt16uWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableInt32uWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableInt32uWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableInt64uWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableInt64uWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableInt8sWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableInt8sWithValue:(int8_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableInt16sWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableInt16sWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableInt32sWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableInt32sWithValue:(int32_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableInt64sWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableInt64sWithValue:(int64_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableEnum8WithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableEnum8WithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableEnum16WithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableEnum16WithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableOctetStringWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableOctetStringWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeNullableCharStringWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeNullableCharStringWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; + - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 2a0c79e7e18dc4..b84919815ef954 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -6174,6 +6174,244 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } +- (void)readAttributeNullableBooleanWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableBoolean(success, failure); + }); +} + +- (void)writeAttributeNullableBooleanWithValue:(bool)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableBoolean(success, failure, value); + }); +} + +- (void)readAttributeNullableBitmap8WithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableBitmap8(success, failure); + }); +} + +- (void)writeAttributeNullableBitmap8WithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableBitmap8(success, failure, value); + }); +} + +- (void)readAttributeNullableBitmap16WithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableBitmap16(success, failure); + }); +} + +- (void)writeAttributeNullableBitmap16WithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableBitmap16(success, failure, value); + }); +} + +- (void)readAttributeNullableBitmap32WithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableBitmap32(success, failure); + }); +} + +- (void)writeAttributeNullableBitmap32WithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableBitmap32(success, failure, value); + }); +} + +- (void)readAttributeNullableBitmap64WithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableBitmap64(success, failure); + }); +} + +- (void)writeAttributeNullableBitmap64WithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableBitmap64(success, failure, value); + }); +} + +- (void)readAttributeNullableInt8uWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableInt8u(success, failure); + }); +} + +- (void)writeAttributeNullableInt8uWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableInt8u(success, failure, value); + }); +} + +- (void)readAttributeNullableInt16uWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableInt16u(success, failure); + }); +} + +- (void)writeAttributeNullableInt16uWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableInt16u(success, failure, value); + }); +} + +- (void)readAttributeNullableInt32uWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableInt32u(success, failure); + }); +} + +- (void)writeAttributeNullableInt32uWithValue:(uint32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableInt32u(success, failure, value); + }); +} + +- (void)readAttributeNullableInt64uWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableInt64u(success, failure); + }); +} + +- (void)writeAttributeNullableInt64uWithValue:(uint64_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableInt64u(success, failure, value); + }); +} + +- (void)readAttributeNullableInt8sWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableInt8s(success, failure); + }); +} + +- (void)writeAttributeNullableInt8sWithValue:(int8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableInt8s(success, failure, value); + }); +} + +- (void)readAttributeNullableInt16sWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableInt16s(success, failure); + }); +} + +- (void)writeAttributeNullableInt16sWithValue:(int16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableInt16s(success, failure, value); + }); +} + +- (void)readAttributeNullableInt32sWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt32sAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableInt32s(success, failure); + }); +} + +- (void)writeAttributeNullableInt32sWithValue:(int32_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableInt32s(success, failure, value); + }); +} + +- (void)readAttributeNullableInt64sWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt64sAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableInt64s(success, failure); + }); +} + +- (void)writeAttributeNullableInt64sWithValue:(int64_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableInt64s(success, failure, value); + }); +} + +- (void)readAttributeNullableEnum8WithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableEnum8(success, failure); + }); +} + +- (void)writeAttributeNullableEnum8WithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableEnum8(success, failure, static_cast(value)); + }); +} + +- (void)readAttributeNullableEnum16WithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableEnum16(success, failure); + }); +} + +- (void)writeAttributeNullableEnum16WithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableEnum16(success, failure, static_cast(value)); + }); +} + +- (void)readAttributeNullableOctetStringWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPOctetStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableOctetString(success, failure); + }); +} + +- (void)writeAttributeNullableOctetStringWithValue:(NSData *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableOctetString(success, failure, [self asByteSpan:value]); + }); +} + +- (void)readAttributeNullableCharStringWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeNullableCharString(success, failure); + }); +} + +- (void)writeAttributeNullableCharStringWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeNullableCharString(success, failure, [self asCharSpan:value]); + }); +} + - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index ecb85791eb497f..e006df498b3872 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -918,17 +918,41 @@ /* 8444 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* 8448 - nullable_bitmap32, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8452 - nullable_bitmap64, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8460 - nullable_int32u, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8464 - nullable_int64u, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8472 - nullable_int32s, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8476 - nullable_int64s, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8484 - nullable_octet_string, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8495 - nullable_char_string, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 8448 - measurement type, */ \ + /* 8506 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 8452 - total active power, */ \ + /* 8510 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 8456 - FeatureMap, */ \ + /* 8514 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -1827,23 +1851,47 @@ /* 8444 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* 8448 - nullable_bitmap32, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8452 - nullable_bitmap64, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8460 - nullable_int32u, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8464 - nullable_int64u, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8472 - nullable_int32s, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8476 - nullable_int64s, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8484 - nullable_octet_string, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8495 - nullable_char_string, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 8448 - measurement type, */ \ + /* 8506 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 8452 - total active power, */ \ + /* 8510 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 8456 - FeatureMap, */ \ + /* 8514 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (150) +#define GENERATED_DEFAULTS_COUNT (158) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1871,7 +1919,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 500 +#define GENERATED_ATTRIBUTE_COUNT 517 #define GENERATED_ATTRIBUTES \ { \ \ @@ -2492,12 +2540,46 @@ { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(8444) }, /* epoch_s */ \ { 0x0022, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* vendor_id */ \ { 0x0023, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ + ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ + { 0x8000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(false) }, /* nullable_boolean */ \ + { 0x8001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* nullable_bitmap8 */ \ + { 0x8002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* nullable_bitmap16 */ \ + { 0x8003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(8448) }, /* nullable_bitmap32 */ \ + { 0x8004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(8452) }, /* nullable_bitmap64 */ \ + { 0x8005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8u */ \ + { 0x8006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16u */ \ + { 0x8008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(8460) }, /* nullable_int32u */ \ + { 0x800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(8464) }, /* nullable_int64u */ \ + { 0x800D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8s */ \ + { 0x800E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16s */ \ + { 0x8010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(8472) }, /* nullable_int32s */ \ + { 0x8014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(8476) }, /* nullable_int64s */ \ + { 0x8015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum8 */ \ + { 0x8016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum16 */ \ + { 0x8019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(8484) }, /* nullable_octet_string */ \ + { 0x801E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(8495) }, /* nullable_char_string */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8448) }, /* measurement type */ \ - { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8452) }, /* total active power */ \ + { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8506) }, /* measurement type */ \ + { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8510) }, /* total active power */ \ { 0x0505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ { 0x0506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ { 0x0507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ @@ -2518,7 +2600,7 @@ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8456) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8514) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -2807,25 +2889,25 @@ 0x050E, ZAP_ATTRIBUTE_INDEX(443), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(444), 27, 2609, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(444), 44, 2680, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(471), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(488), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(483), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(500), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(484), \ + ZAP_ATTRIBUTE_INDEX(501), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(491), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(508), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(496), \ + ZAP_ATTRIBUTE_INDEX(513), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2837,7 +2919,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 2400 }, { ZAP_CLUSTER_INDEX(18), 44, 6572 }, { ZAP_CLUSTER_INDEX(62), 3, 18 }, \ + { ZAP_CLUSTER_INDEX(0), 18, 2400 }, { ZAP_CLUSTER_INDEX(18), 44, 6643 }, { ZAP_CLUSTER_INDEX(62), 3, 18 }, \ } // Largest attribute size is needed for various buffers @@ -2847,7 +2929,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1518) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (8990) +#define ATTRIBUTE_MAX_SIZE (9061) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index 7be477f2de5fd8..d8ba86510663b6 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -1392,6 +1392,23 @@ #define ZCL_TEST_VENDOR_ID_ATTRIBUTE_ID (0x0022) #define ZCL_LIST_OF_STRUCTS_WITH_OPTIONALS_ATTRIBUTE_ID (0x0023) #define ZCL_UNSUPPORTED_ATTRIBUTE_ID (0x00FF) +#define ZCL_NULLABLE_BOOLEAN_ATTRIBUTE_ID (0x8000) +#define ZCL_NULLABLE_BITMAP8_ATTRIBUTE_ID (0x8001) +#define ZCL_NULLABLE_BITMAP16_ATTRIBUTE_ID (0x8002) +#define ZCL_NULLABLE_BITMAP32_ATTRIBUTE_ID (0x8003) +#define ZCL_NULLABLE_BITMAP64_ATTRIBUTE_ID (0x8004) +#define ZCL_NULLABLE_INT8_U_ATTRIBUTE_ID (0x8005) +#define ZCL_NULLABLE_INT16_U_ATTRIBUTE_ID (0x8006) +#define ZCL_NULLABLE_INT32_U_ATTRIBUTE_ID (0x8008) +#define ZCL_NULLABLE_INT64_U_ATTRIBUTE_ID (0x800C) +#define ZCL_NULLABLE_INT8_S_ATTRIBUTE_ID (0x800D) +#define ZCL_NULLABLE_INT16_S_ATTRIBUTE_ID (0x800E) +#define ZCL_NULLABLE_INT32_S_ATTRIBUTE_ID (0x8010) +#define ZCL_NULLABLE_INT64_S_ATTRIBUTE_ID (0x8014) +#define ZCL_NULLABLE_ENUM8_ATTRIBUTE_ID (0x8015) +#define ZCL_NULLABLE_ENUM16_ATTRIBUTE_ID (0x8016) +#define ZCL_NULLABLE_OCTET_STRING_ATTRIBUTE_ID (0x8019) +#define ZCL_NULLABLE_CHAR_STRING_ATTRIBUTE_ID (0x801E) // Attribute ids for cluster: Messaging diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 335acd65f1a426..74bb28bbf77297 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -20342,6 +20342,792 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) } // namespace Unsupported +namespace NullableBoolean { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableBoolean + +namespace NullableBitmap8 { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableBitmap8 + +namespace NullableBitmap16 { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableBitmap16 + +namespace NullableBitmap32 { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableBitmap32 + +namespace NullableBitmap64 { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_BITMAP64_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_BITMAP64_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableBitmap64 + +namespace NullableInt8u { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableInt8u + +namespace NullableInt16u { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableInt16u + +namespace NullableInt32u { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_INT32U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableInt32u + +namespace NullableInt64u { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_INT64U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_INT64U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableInt64u + +namespace NullableInt8s { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_INT8S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_INT8S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableInt8s + +namespace NullableInt16s { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_INT16S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableInt16s + +namespace NullableInt32s { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_INT32S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_INT32S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableInt32s + +namespace NullableInt64s { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_INT64S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_INT64S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableInt64s + +namespace NullableEnum8 { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableEnum8 + +namespace NullableEnum16 { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&temp), sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = temp; + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_INVALID_ARGUMENT; + } + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, (uint8_t *) &value, ZCL_ENUM16_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + auto value = NumericAttributeTraits::kNullValue; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, reinterpret_cast(&value), + ZCL_ENUM16_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableEnum16 + +namespace NullableOctetString { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + uint8_t zclString[10 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + value.SetNull(); + return EMBER_ZCL_STATUS_SUCCESS; + } + auto & span = value.SetNonNull(); + + VerifyOrReturnError(span.size() == 10, EMBER_ZCL_STATUS_INVALID_ARGUMENT); + memcpy(span.data(), &zclString[1], 10); + span.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +{ + static_assert(10 != NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 10, EMBER_ZCL_STATUS_INVALID_ARGUMENT); + uint8_t zclString[10 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableOctetString + +namespace NullableCharString { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + uint8_t zclString[10 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + value.SetNull(); + return EMBER_ZCL_STATUS_SUCCESS; + } + auto & span = value.SetNonNull(); + + VerifyOrReturnError(span.size() == 10, EMBER_ZCL_STATUS_INVALID_ARGUMENT); + memcpy(span.data(), &zclString[1], 10); + span.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(10 != NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 10, EMBER_ZCL_STATUS_INVALID_ARGUMENT); + uint8_t zclString[10 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NullableCharString + } // namespace Attributes } // namespace TestCluster diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 5009cddb196421..b200911b960bb5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -4252,6 +4252,125 @@ EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace Unsupported +namespace NullableBoolean { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // boolean +EmberAfStatus Set(chip::EndpointId endpoint, bool value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableBoolean + +namespace NullableBitmap8 { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap8 +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableBitmap8 + +namespace NullableBitmap16 { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap16 +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableBitmap16 + +namespace NullableBitmap32 { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableBitmap32 + +namespace NullableBitmap64 { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap64 +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableBitmap64 + +namespace NullableInt8u { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableInt8u + +namespace NullableInt16u { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableInt16u + +namespace NullableInt32u { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableInt32u + +namespace NullableInt64u { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableInt64u + +namespace NullableInt8s { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8s +EmberAfStatus Set(chip::EndpointId endpoint, int8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableInt8s + +namespace NullableInt16s { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableInt16s + +namespace NullableInt32s { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32s +EmberAfStatus Set(chip::EndpointId endpoint, int32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableInt32s + +namespace NullableInt64s { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64s +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableInt64s + +namespace NullableEnum8 { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // enum8 +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableEnum8 + +namespace NullableEnum16 { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // enum16 +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableEnum16 + +namespace NullableOctetString { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableOctetString + +namespace NullableCharString { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +} // namespace NullableCharString + } // namespace Attributes } // namespace TestCluster diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 411fcc4f32e0de..31e0fb58f91e17 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -25469,6 +25469,193 @@ struct TypeInfo static constexpr AttributeId GetAttributeId() { return Attributes::Unsupported::Id; } }; } // namespace Unsupported +namespace NullableBoolean { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableBoolean::Id; } +}; +} // namespace NullableBoolean +namespace NullableBitmap8 { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap8::Id; } +}; +} // namespace NullableBitmap8 +namespace NullableBitmap16 { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap16::Id; } +}; +} // namespace NullableBitmap16 +namespace NullableBitmap32 { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap32::Id; } +}; +} // namespace NullableBitmap32 +namespace NullableBitmap64 { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap64::Id; } +}; +} // namespace NullableBitmap64 +namespace NullableInt8u { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt8u::Id; } +}; +} // namespace NullableInt8u +namespace NullableInt16u { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt16u::Id; } +}; +} // namespace NullableInt16u +namespace NullableInt32u { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt32u::Id; } +}; +} // namespace NullableInt32u +namespace NullableInt64u { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt64u::Id; } +}; +} // namespace NullableInt64u +namespace NullableInt8s { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt8s::Id; } +}; +} // namespace NullableInt8s +namespace NullableInt16s { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt16s::Id; } +}; +} // namespace NullableInt16s +namespace NullableInt32s { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt32s::Id; } +}; +} // namespace NullableInt32s +namespace NullableInt64s { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableInt64s::Id; } +}; +} // namespace NullableInt64s +namespace NullableEnum8 { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableEnum8::Id; } +}; +} // namespace NullableEnum8 +namespace NullableEnum16 { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableEnum16::Id; } +}; +} // namespace NullableEnum16 +namespace NullableOctetString { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableOctetString::Id; } +}; +} // namespace NullableOctetString +namespace NullableCharString { +struct TypeInfo +{ + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NullableCharString::Id; } +}; +} // namespace NullableCharString namespace FeatureMap { struct TypeInfo { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 3c6feef0adebe6..50cc4fd8a2df34 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -4516,6 +4516,74 @@ namespace Unsupported { static constexpr AttributeId Id = 0x000000FF; } // namespace Unsupported +namespace NullableBoolean { +static constexpr AttributeId Id = 0x00008000; +} // namespace NullableBoolean + +namespace NullableBitmap8 { +static constexpr AttributeId Id = 0x00008001; +} // namespace NullableBitmap8 + +namespace NullableBitmap16 { +static constexpr AttributeId Id = 0x00008002; +} // namespace NullableBitmap16 + +namespace NullableBitmap32 { +static constexpr AttributeId Id = 0x00008003; +} // namespace NullableBitmap32 + +namespace NullableBitmap64 { +static constexpr AttributeId Id = 0x00008004; +} // namespace NullableBitmap64 + +namespace NullableInt8u { +static constexpr AttributeId Id = 0x00008005; +} // namespace NullableInt8u + +namespace NullableInt16u { +static constexpr AttributeId Id = 0x00008006; +} // namespace NullableInt16u + +namespace NullableInt32u { +static constexpr AttributeId Id = 0x00008008; +} // namespace NullableInt32u + +namespace NullableInt64u { +static constexpr AttributeId Id = 0x0000800C; +} // namespace NullableInt64u + +namespace NullableInt8s { +static constexpr AttributeId Id = 0x0000800D; +} // namespace NullableInt8s + +namespace NullableInt16s { +static constexpr AttributeId Id = 0x0000800E; +} // namespace NullableInt16s + +namespace NullableInt32s { +static constexpr AttributeId Id = 0x00008010; +} // namespace NullableInt32s + +namespace NullableInt64s { +static constexpr AttributeId Id = 0x00008014; +} // namespace NullableInt64s + +namespace NullableEnum8 { +static constexpr AttributeId Id = 0x00008015; +} // namespace NullableEnum8 + +namespace NullableEnum16 { +static constexpr AttributeId Id = 0x00008016; +} // namespace NullableEnum16 + +namespace NullableOctetString { +static constexpr AttributeId Id = 0x00008019; +} // namespace NullableOctetString + +namespace NullableCharString { +static constexpr AttributeId Id = 0x0000801E; +} // namespace NullableCharString + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index abe7a2e40c9e99..ba18179efbbc62 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -21818,6 +21818,23 @@ class ReadTemperatureMeasurementClusterRevision : public ModelCommand | * VendorId | 0x0022 | | * ListNullablesAndOptionalsStruct | 0x0023 | | * Unsupported | 0x00FF | +| * NullableBoolean | 0x8000 | +| * NullableBitmap8 | 0x8001 | +| * NullableBitmap16 | 0x8002 | +| * NullableBitmap32 | 0x8003 | +| * NullableBitmap64 | 0x8004 | +| * NullableInt8u | 0x8005 | +| * NullableInt16u | 0x8006 | +| * NullableInt32u | 0x8008 | +| * NullableInt64u | 0x800C | +| * NullableInt8s | 0x800D | +| * NullableInt16s | 0x800E | +| * NullableInt32s | 0x8010 | +| * NullableInt64s | 0x8014 | +| * NullableEnum8 | 0x8015 | +| * NullableEnum16 | 0x8016 | +| * NullableOctetString | 0x8019 | +| * NullableCharString | 0x801E | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -23762,6 +23779,1145 @@ class WriteTestClusterUnsupported : public ModelCommand bool mValue; }; +/* + * Attribute NullableBoolean + */ +class ReadTestClusterNullableBoolean : public ModelCommand +{ +public: + ReadTestClusterNullableBoolean() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-boolean"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableBoolean() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableBoolean(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnBooleanAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableBoolean : public ModelCommand +{ +public: + WriteTestClusterNullableBoolean() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-boolean"); + AddArgument("attr-value", 0, 1, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableBoolean() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableBoolean(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + bool mValue; +}; + +/* + * Attribute NullableBitmap8 + */ +class ReadTestClusterNullableBitmap8 : public ModelCommand +{ +public: + ReadTestClusterNullableBitmap8() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-bitmap8"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableBitmap8() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableBitmap8(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableBitmap8 : public ModelCommand +{ +public: + WriteTestClusterNullableBitmap8() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-bitmap8"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableBitmap8() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableBitmap8(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint8_t mValue; +}; + +/* + * Attribute NullableBitmap16 + */ +class ReadTestClusterNullableBitmap16 : public ModelCommand +{ +public: + ReadTestClusterNullableBitmap16() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-bitmap16"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableBitmap16() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableBitmap16(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableBitmap16 : public ModelCommand +{ +public: + WriteTestClusterNullableBitmap16() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-bitmap16"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableBitmap16() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableBitmap16(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint16_t mValue; +}; + +/* + * Attribute NullableBitmap32 + */ +class ReadTestClusterNullableBitmap32 : public ModelCommand +{ +public: + ReadTestClusterNullableBitmap32() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-bitmap32"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableBitmap32() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableBitmap32(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt32uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableBitmap32 : public ModelCommand +{ +public: + WriteTestClusterNullableBitmap32() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-bitmap32"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableBitmap32() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableBitmap32(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint32_t mValue; +}; + +/* + * Attribute NullableBitmap64 + */ +class ReadTestClusterNullableBitmap64 : public ModelCommand +{ +public: + ReadTestClusterNullableBitmap64() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-bitmap64"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableBitmap64() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableBitmap64(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt64uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableBitmap64 : public ModelCommand +{ +public: + WriteTestClusterNullableBitmap64() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-bitmap64"); + AddArgument("attr-value", 0, UINT64_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableBitmap64() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableBitmap64(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint64_t mValue; +}; + +/* + * Attribute NullableInt8u + */ +class ReadTestClusterNullableInt8u : public ModelCommand +{ +public: + ReadTestClusterNullableInt8u() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-int8u"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableInt8u() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableInt8u(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableInt8u : public ModelCommand +{ +public: + WriteTestClusterNullableInt8u() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-int8u"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableInt8u() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableInt8u(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint8_t mValue; +}; + +/* + * Attribute NullableInt16u + */ +class ReadTestClusterNullableInt16u : public ModelCommand +{ +public: + ReadTestClusterNullableInt16u() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-int16u"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableInt16u() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableInt16u(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableInt16u : public ModelCommand +{ +public: + WriteTestClusterNullableInt16u() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-int16u"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableInt16u() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableInt16u(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint16_t mValue; +}; + +/* + * Attribute NullableInt32u + */ +class ReadTestClusterNullableInt32u : public ModelCommand +{ +public: + ReadTestClusterNullableInt32u() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-int32u"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableInt32u() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableInt32u(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt32uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableInt32u : public ModelCommand +{ +public: + WriteTestClusterNullableInt32u() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-int32u"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableInt32u() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableInt32u(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint32_t mValue; +}; + +/* + * Attribute NullableInt64u + */ +class ReadTestClusterNullableInt64u : public ModelCommand +{ +public: + ReadTestClusterNullableInt64u() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-int64u"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableInt64u() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableInt64u(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt64uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableInt64u : public ModelCommand +{ +public: + WriteTestClusterNullableInt64u() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-int64u"); + AddArgument("attr-value", 0, UINT64_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableInt64u() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableInt64u(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint64_t mValue; +}; + +/* + * Attribute NullableInt8s + */ +class ReadTestClusterNullableInt8s : public ModelCommand +{ +public: + ReadTestClusterNullableInt8s() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-int8s"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableInt8s() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableInt8s(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8sAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableInt8s : public ModelCommand +{ +public: + WriteTestClusterNullableInt8s() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-int8s"); + AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableInt8s() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableInt8s(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + int8_t mValue; +}; + +/* + * Attribute NullableInt16s + */ +class ReadTestClusterNullableInt16s : public ModelCommand +{ +public: + ReadTestClusterNullableInt16s() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-int16s"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableInt16s() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableInt16s(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16sAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableInt16s : public ModelCommand +{ +public: + WriteTestClusterNullableInt16s() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-int16s"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableInt16s() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableInt16s(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + int16_t mValue; +}; + +/* + * Attribute NullableInt32s + */ +class ReadTestClusterNullableInt32s : public ModelCommand +{ +public: + ReadTestClusterNullableInt32s() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-int32s"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableInt32s() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableInt32s(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt32sAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableInt32s : public ModelCommand +{ +public: + WriteTestClusterNullableInt32s() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-int32s"); + AddArgument("attr-value", INT32_MIN, INT32_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableInt32s() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableInt32s(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + int32_t mValue; +}; + +/* + * Attribute NullableInt64s + */ +class ReadTestClusterNullableInt64s : public ModelCommand +{ +public: + ReadTestClusterNullableInt64s() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-int64s"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableInt64s() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableInt64s(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt64sAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableInt64s : public ModelCommand +{ +public: + WriteTestClusterNullableInt64s() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-int64s"); + AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableInt64s() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableInt64s(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + int64_t mValue; +}; + +/* + * Attribute NullableEnum8 + */ +class ReadTestClusterNullableEnum8 : public ModelCommand +{ +public: + ReadTestClusterNullableEnum8() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-enum8"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableEnum8() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableEnum8(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableEnum8 : public ModelCommand +{ +public: + WriteTestClusterNullableEnum8() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-enum8"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableEnum8() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableEnum8(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint8_t mValue; +}; + +/* + * Attribute NullableEnum16 + */ +class ReadTestClusterNullableEnum16 : public ModelCommand +{ +public: + ReadTestClusterNullableEnum16() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-enum16"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableEnum16() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableEnum16(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableEnum16 : public ModelCommand +{ +public: + WriteTestClusterNullableEnum16() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-enum16"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableEnum16() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableEnum16(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint16_t mValue; +}; + +/* + * Attribute NullableOctetString + */ +class ReadTestClusterNullableOctetString : public ModelCommand +{ +public: + ReadTestClusterNullableOctetString() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-octet-string"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableOctetString() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableOctetString(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnOctetStringAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableOctetString : public ModelCommand +{ +public: + WriteTestClusterNullableOctetString() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-octet-string"); + AddArgument("attr-value", &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableOctetString() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableOctetString(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + chip::ByteSpan mValue; +}; + +/* + * Attribute NullableCharString + */ +class ReadTestClusterNullableCharString : public ModelCommand +{ +public: + ReadTestClusterNullableCharString() : ModelCommand("read") + { + AddArgument("attr-name", "nullable-char-string"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterNullableCharString() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeNullableCharString(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnCharStringAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteTestClusterNullableCharString : public ModelCommand +{ +public: + WriteTestClusterNullableCharString() : ModelCommand("write") + { + AddArgument("attr-name", "nullable-char-string"); + AddArgument("attr-value", &mValue); + ModelCommand::AddArguments(); + } + + ~WriteTestClusterNullableCharString() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeNullableCharString(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + chip::CharSpan mValue; +}; + /* * Attribute ClusterRevision */ @@ -30450,6 +31606,40 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // }; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index b5ba0cacf25f5e..8ea6d31a658f64 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -615,26 +615,9 @@ class Test_TC_BI_2_2 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 8; - chip::Callback::Callback mOnFailureCallback_0{ OnFailureCallback_0, this }; - chip::Callback::Callback mOnSuccessCallback_0{ OnSuccessCallback_0, this }; - chip::Callback::Callback mOnFailureCallback_1{ OnFailureCallback_1, this }; - chip::Callback::Callback mOnSuccessCallback_1{ OnSuccessCallback_1, this }; - chip::Callback::Callback mOnFailureCallback_2{ OnFailureCallback_2, this }; - chip::Callback::Callback mOnSuccessCallback_2{ OnSuccessCallback_2, this }; - chip::Callback::Callback mOnFailureCallback_3{ OnFailureCallback_3, this }; - chip::Callback::Callback mOnSuccessCallback_3{ OnSuccessCallback_3, this }; - chip::Callback::Callback mOnFailureCallback_4{ OnFailureCallback_4, this }; - chip::Callback::Callback mOnSuccessCallback_4{ OnSuccessCallback_4, this }; - chip::Callback::Callback mOnFailureCallback_5{ OnFailureCallback_5, this }; - chip::Callback::Callback mOnSuccessCallback_5{ OnSuccessCallback_5, this }; - chip::Callback::Callback mOnFailureCallback_6{ OnFailureCallback_6, this }; - chip::Callback::Callback mOnSuccessCallback_6{ OnSuccessCallback_6, this }; - chip::Callback::Callback mOnFailureCallback_7{ OnFailureCallback_7, this }; - chip::Callback::Callback mOnSuccessCallback_7{ OnSuccessCallback_7, this }; - - static void OnFailureCallback_0(void * context, uint8_t status) + static void OnFailureCallback_0(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_0(status); + (static_cast(context))->OnFailureResponse_0(chip::to_underlying(status)); } static void OnSuccessCallback_0(void * context, bool presentValue) @@ -642,9 +625,9 @@ class Test_TC_BI_2_2 : public TestCommand (static_cast(context))->OnSuccessResponse_0(presentValue); } - static void OnFailureCallback_1(void * context, uint8_t status) + static void OnFailureCallback_1(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_1(status); + (static_cast(context))->OnFailureResponse_1(chip::to_underlying(status)); } static void OnSuccessCallback_1(void * context, bool outOfService) @@ -652,9 +635,9 @@ class Test_TC_BI_2_2 : public TestCommand (static_cast(context))->OnSuccessResponse_1(outOfService); } - static void OnFailureCallback_2(void * context, uint8_t status) + static void OnFailureCallback_2(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); + (static_cast(context))->OnFailureResponse_2(chip::to_underlying(status)); } static void OnSuccessCallback_2(void * context, uint8_t statusFlags) @@ -662,9 +645,9 @@ class Test_TC_BI_2_2 : public TestCommand (static_cast(context))->OnSuccessResponse_2(statusFlags); } - static void OnFailureCallback_3(void * context, uint8_t status) + static void OnFailureCallback_3(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_3(status); + (static_cast(context))->OnFailureResponse_3(chip::to_underlying(status)); } static void OnSuccessCallback_3(void * context, bool presentValue) @@ -672,9 +655,9 @@ class Test_TC_BI_2_2 : public TestCommand (static_cast(context))->OnSuccessResponse_3(presentValue); } - static void OnFailureCallback_4(void * context, uint8_t status) + static void OnFailureCallback_4(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_4(status); + (static_cast(context))->OnFailureResponse_4(chip::to_underlying(status)); } static void OnSuccessCallback_4(void * context, bool outOfService) @@ -682,9 +665,9 @@ class Test_TC_BI_2_2 : public TestCommand (static_cast(context))->OnSuccessResponse_4(outOfService); } - static void OnFailureCallback_5(void * context, uint8_t status) + static void OnFailureCallback_5(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_5(status); + (static_cast(context))->OnFailureResponse_5(chip::to_underlying(status)); } static void OnSuccessCallback_5(void * context, uint8_t statusFlags) @@ -692,9 +675,9 @@ class Test_TC_BI_2_2 : public TestCommand (static_cast(context))->OnSuccessResponse_5(statusFlags); } - static void OnFailureCallback_6(void * context, uint8_t status) + static void OnFailureCallback_6(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_6(status); + (static_cast(context))->OnFailureResponse_6(chip::to_underlying(status)); } static void OnSuccessCallback_6(void * context, uint8_t statusFlags) @@ -702,9 +685,9 @@ class Test_TC_BI_2_2 : public TestCommand (static_cast(context))->OnSuccessResponse_6(statusFlags); } - static void OnFailureCallback_7(void * context, uint8_t status) + static void OnFailureCallback_7(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_7(status); + (static_cast(context))->OnFailureResponse_7(chip::to_underlying(status)); } static void OnSuccessCallback_7(void * context, uint8_t statusFlags) @@ -721,7 +704,8 @@ class Test_TC_BI_2_2 : public TestCommand chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributePresentValue(mOnSuccessCallback_0.Cancel(), mOnFailureCallback_0.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_0, OnFailureCallback_0); } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -737,7 +721,8 @@ class Test_TC_BI_2_2 : public TestCommand chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeOutOfService(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1); } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -753,7 +738,8 @@ class Test_TC_BI_2_2 : public TestCommand chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeStatusFlags(mOnSuccessCallback_2.Cancel(), mOnFailureCallback_2.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2); } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -769,7 +755,8 @@ class Test_TC_BI_2_2 : public TestCommand chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributePresentValue(mOnSuccessCallback_3.Cancel(), mOnFailureCallback_3.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3); } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -785,7 +772,8 @@ class Test_TC_BI_2_2 : public TestCommand chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeOutOfService(mOnSuccessCallback_4.Cancel(), mOnFailureCallback_4.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4); } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -801,7 +789,8 @@ class Test_TC_BI_2_2 : public TestCommand chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeStatusFlags(mOnSuccessCallback_5.Cancel(), mOnFailureCallback_5.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5); } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } @@ -817,7 +806,8 @@ class Test_TC_BI_2_2 : public TestCommand chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeStatusFlags(mOnSuccessCallback_6.Cancel(), mOnFailureCallback_6.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6); } void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } @@ -833,7 +823,8 @@ class Test_TC_BI_2_2 : public TestCommand chip::Controller::BinaryInputBasicClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeStatusFlags(mOnSuccessCallback_7.Cancel(), mOnFailureCallback_7.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7); } void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } @@ -21012,141 +21003,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 60; - chip::Callback::Callback mOnFailureCallback_0{ OnFailureCallback_0, this }; - chip::Callback::Callback mOnSuccessCallback_0{ OnSuccessCallback_0, this }; - chip::Callback::Callback mOnFailureCallback_1{ OnFailureCallback_1, this }; - chip::Callback::Callback mOnSuccessCallback_1{ OnSuccessCallback_1, - this }; - chip::Callback::Callback mOnFailureCallback_2{ OnFailureCallback_2, this }; - chip::Callback::Callback mOnSuccessCallback_2{ OnSuccessCallback_2, - this }; - chip::Callback::Callback mOnFailureCallback_4{ OnFailureCallback_4, this }; - chip::Callback::Callback mOnSuccessCallback_4{ OnSuccessCallback_4, - this }; - chip::Callback::Callback mOnFailureCallback_5{ OnFailureCallback_5, this }; - chip::Callback::Callback mOnSuccessCallback_5{ OnSuccessCallback_5, - this }; - chip::Callback::Callback mOnFailureCallback_6{ OnFailureCallback_6, this }; - chip::Callback::Callback mOnSuccessCallback_6{ OnSuccessCallback_6, - this }; - chip::Callback::Callback mOnFailureCallback_8{ OnFailureCallback_8, this }; - chip::Callback::Callback mOnSuccessCallback_8{ OnSuccessCallback_8, - this }; - chip::Callback::Callback mOnFailureCallback_9{ OnFailureCallback_9, this }; - chip::Callback::Callback mOnSuccessCallback_9{ OnSuccessCallback_9, - this }; - chip::Callback::Callback mOnFailureCallback_10{ OnFailureCallback_10, this }; - chip::Callback::Callback mOnSuccessCallback_10{ OnSuccessCallback_10, - this }; - chip::Callback::Callback mOnFailureCallback_12{ OnFailureCallback_12, this }; - chip::Callback::Callback mOnSuccessCallback_12{ OnSuccessCallback_12, - this }; - chip::Callback::Callback mOnFailureCallback_13{ OnFailureCallback_13, this }; - chip::Callback::Callback mOnSuccessCallback_13{ OnSuccessCallback_13, - this }; - chip::Callback::Callback mOnFailureCallback_14{ OnFailureCallback_14, this }; - chip::Callback::Callback mOnSuccessCallback_14{ OnSuccessCallback_14, - this }; - chip::Callback::Callback mOnFailureCallback_16{ OnFailureCallback_16, this }; - chip::Callback::Callback mOnSuccessCallback_16{ OnSuccessCallback_16, - this }; - chip::Callback::Callback mOnFailureCallback_17{ OnFailureCallback_17, this }; - chip::Callback::Callback mOnSuccessCallback_17{ OnSuccessCallback_17, - this }; - chip::Callback::Callback mOnFailureCallback_18{ OnFailureCallback_18, this }; - chip::Callback::Callback mOnSuccessCallback_18{ OnSuccessCallback_18, - this }; - chip::Callback::Callback mOnFailureCallback_20{ OnFailureCallback_20, this }; - chip::Callback::Callback mOnSuccessCallback_20{ OnSuccessCallback_20, - this }; - chip::Callback::Callback mOnFailureCallback_21{ OnFailureCallback_21, this }; - chip::Callback::Callback mOnSuccessCallback_21{ OnSuccessCallback_21, - this }; - chip::Callback::Callback mOnFailureCallback_22{ OnFailureCallback_22, this }; - chip::Callback::Callback mOnSuccessCallback_22{ OnSuccessCallback_22, - this }; - chip::Callback::Callback mOnFailureCallback_24{ OnFailureCallback_24, this }; - chip::Callback::Callback mOnSuccessCallback_24{ OnSuccessCallback_24, - this }; - chip::Callback::Callback mOnFailureCallback_25{ OnFailureCallback_25, this }; - chip::Callback::Callback mOnSuccessCallback_25{ OnSuccessCallback_25, - this }; - chip::Callback::Callback mOnFailureCallback_26{ OnFailureCallback_26, this }; - chip::Callback::Callback mOnSuccessCallback_26{ OnSuccessCallback_26, - this }; - chip::Callback::Callback mOnFailureCallback_28{ OnFailureCallback_28, this }; - chip::Callback::Callback mOnSuccessCallback_28{ OnSuccessCallback_28, - this }; - chip::Callback::Callback mOnFailureCallback_29{ OnFailureCallback_29, this }; - chip::Callback::Callback mOnSuccessCallback_29{ OnSuccessCallback_29, - this }; - chip::Callback::Callback mOnFailureCallback_30{ OnFailureCallback_30, this }; - chip::Callback::Callback mOnSuccessCallback_30{ OnSuccessCallback_30, - this }; - chip::Callback::Callback mOnFailureCallback_32{ OnFailureCallback_32, this }; - chip::Callback::Callback mOnSuccessCallback_32{ OnSuccessCallback_32, - this }; - chip::Callback::Callback mOnFailureCallback_33{ OnFailureCallback_33, this }; - chip::Callback::Callback mOnSuccessCallback_33{ OnSuccessCallback_33, - this }; - chip::Callback::Callback mOnFailureCallback_34{ OnFailureCallback_34, this }; - chip::Callback::Callback mOnSuccessCallback_34{ OnSuccessCallback_34, - this }; - chip::Callback::Callback mOnFailureCallback_36{ OnFailureCallback_36, this }; - chip::Callback::Callback mOnSuccessCallback_36{ OnSuccessCallback_36, - this }; - chip::Callback::Callback mOnFailureCallback_37{ OnFailureCallback_37, this }; - chip::Callback::Callback mOnSuccessCallback_37{ OnSuccessCallback_37, - this }; - chip::Callback::Callback mOnFailureCallback_38{ OnFailureCallback_38, this }; - chip::Callback::Callback mOnSuccessCallback_38{ OnSuccessCallback_38, - this }; - chip::Callback::Callback mOnFailureCallback_40{ OnFailureCallback_40, this }; - chip::Callback::Callback mOnSuccessCallback_40{ OnSuccessCallback_40, - this }; - chip::Callback::Callback mOnFailureCallback_41{ OnFailureCallback_41, this }; - chip::Callback::Callback mOnSuccessCallback_41{ - OnSuccessCallback_41, this - }; - chip::Callback::Callback mOnFailureCallback_42{ OnFailureCallback_42, this }; - chip::Callback::Callback mOnSuccessCallback_42{ - OnSuccessCallback_42, this - }; - chip::Callback::Callback mOnFailureCallback_44{ OnFailureCallback_44, this }; - chip::Callback::Callback mOnSuccessCallback_44{ - OnSuccessCallback_44, this - }; - chip::Callback::Callback mOnFailureCallback_45{ OnFailureCallback_45, this }; - chip::Callback::Callback mOnSuccessCallback_45{ OnSuccessCallback_45, this }; - chip::Callback::Callback mOnFailureCallback_46{ OnFailureCallback_46, this }; - chip::Callback::Callback mOnSuccessCallback_46{ OnSuccessCallback_46, this }; - chip::Callback::Callback mOnFailureCallback_48{ OnFailureCallback_48, this }; - chip::Callback::Callback mOnSuccessCallback_48{ OnSuccessCallback_48, this }; - chip::Callback::Callback mOnFailureCallback_49{ OnFailureCallback_49, this }; - chip::Callback::Callback mOnSuccessCallback_49{ OnSuccessCallback_49, - this }; - chip::Callback::Callback mOnFailureCallback_50{ OnFailureCallback_50, this }; - chip::Callback::Callback mOnSuccessCallback_50{ OnSuccessCallback_50, - this }; - chip::Callback::Callback mOnFailureCallback_52{ OnFailureCallback_52, this }; - chip::Callback::Callback mOnSuccessCallback_52{ OnSuccessCallback_52, - this }; - chip::Callback::Callback mOnFailureCallback_53{ OnFailureCallback_53, this }; - chip::Callback::Callback mOnSuccessCallback_53{ OnSuccessCallback_53, this }; - chip::Callback::Callback mOnFailureCallback_55{ OnFailureCallback_55, this }; - chip::Callback::Callback mOnSuccessCallback_55{ OnSuccessCallback_55, this }; - chip::Callback::Callback mOnFailureCallback_56{ OnFailureCallback_56, this }; - chip::Callback::Callback mOnSuccessCallback_56{ - OnSuccessCallback_56, this - }; - chip::Callback::Callback mOnFailureCallback_58{ OnFailureCallback_58, this }; - chip::Callback::Callback mOnSuccessCallback_58{ - OnSuccessCallback_58, this - }; - - static void OnFailureCallback_0(void * context, uint8_t status) + static void OnFailureCallback_0(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_0(status); + (static_cast(context))->OnFailureResponse_0(chip::to_underlying(status)); } static void OnSuccessCallback_0(void * context, int16_t localTemperature) @@ -21154,9 +21013,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_0(localTemperature); } - static void OnFailureCallback_1(void * context, uint8_t status) + static void OnFailureCallback_1(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_1(status); + (static_cast(context))->OnFailureResponse_1(chip::to_underlying(status)); } static void OnSuccessCallback_1(void * context, int16_t absMinHeatSetpointLimit) @@ -21164,9 +21023,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_1(absMinHeatSetpointLimit); } - static void OnFailureCallback_2(void * context, uint8_t status) + static void OnFailureCallback_2(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); + (static_cast(context))->OnFailureResponse_2(chip::to_underlying(status)); } static void OnSuccessCallback_2(void * context, int16_t absMinHeatSetpointLimit) @@ -21181,9 +21040,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } - static void OnFailureCallback_4(void * context, uint8_t status) + static void OnFailureCallback_4(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_4(status); + (static_cast(context))->OnFailureResponse_4(chip::to_underlying(status)); } static void OnSuccessCallback_4(void * context, int16_t absMinHeatSetpointLimit) @@ -21191,9 +21050,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_4(absMinHeatSetpointLimit); } - static void OnFailureCallback_5(void * context, uint8_t status) + static void OnFailureCallback_5(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_5(status); + (static_cast(context))->OnFailureResponse_5(chip::to_underlying(status)); } static void OnSuccessCallback_5(void * context, int16_t absMaxHeatSetpointLimit) @@ -21201,9 +21060,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_5(absMaxHeatSetpointLimit); } - static void OnFailureCallback_6(void * context, uint8_t status) + static void OnFailureCallback_6(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_6(status); + (static_cast(context))->OnFailureResponse_6(chip::to_underlying(status)); } static void OnSuccessCallback_6(void * context, int16_t absMaxHeatSetpointLimit) @@ -21218,9 +21077,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } - static void OnFailureCallback_8(void * context, uint8_t status) + static void OnFailureCallback_8(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_8(status); + (static_cast(context))->OnFailureResponse_8(chip::to_underlying(status)); } static void OnSuccessCallback_8(void * context, int16_t absMaxHeatSetpointLimit) @@ -21228,9 +21087,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_8(absMaxHeatSetpointLimit); } - static void OnFailureCallback_9(void * context, uint8_t status) + static void OnFailureCallback_9(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_9(status); + (static_cast(context))->OnFailureResponse_9(chip::to_underlying(status)); } static void OnSuccessCallback_9(void * context, int16_t absMinCoolSetpointLimit) @@ -21238,9 +21097,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_9(absMinCoolSetpointLimit); } - static void OnFailureCallback_10(void * context, uint8_t status) + static void OnFailureCallback_10(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_10(status); + (static_cast(context))->OnFailureResponse_10(chip::to_underlying(status)); } static void OnSuccessCallback_10(void * context, int16_t absMinCoolSetpointLimit) @@ -21255,9 +21114,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } - static void OnFailureCallback_12(void * context, uint8_t status) + static void OnFailureCallback_12(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_12(status); + (static_cast(context))->OnFailureResponse_12(chip::to_underlying(status)); } static void OnSuccessCallback_12(void * context, int16_t absMinCoolSetpointLimit) @@ -21265,9 +21124,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_12(absMinCoolSetpointLimit); } - static void OnFailureCallback_13(void * context, uint8_t status) + static void OnFailureCallback_13(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_13(status); + (static_cast(context))->OnFailureResponse_13(chip::to_underlying(status)); } static void OnSuccessCallback_13(void * context, int16_t absMaxCoolSetpointLimit) @@ -21275,9 +21134,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_13(absMaxCoolSetpointLimit); } - static void OnFailureCallback_14(void * context, uint8_t status) + static void OnFailureCallback_14(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_14(status); + (static_cast(context))->OnFailureResponse_14(chip::to_underlying(status)); } static void OnSuccessCallback_14(void * context, int16_t absMaxCoolSetpointLimit) @@ -21292,9 +21151,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_15(void * context) { (static_cast(context))->OnSuccessResponse_15(); } - static void OnFailureCallback_16(void * context, uint8_t status) + static void OnFailureCallback_16(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_16(status); + (static_cast(context))->OnFailureResponse_16(chip::to_underlying(status)); } static void OnSuccessCallback_16(void * context, int16_t absMaxCoolSetpointLimit) @@ -21302,9 +21161,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_16(absMaxCoolSetpointLimit); } - static void OnFailureCallback_17(void * context, uint8_t status) + static void OnFailureCallback_17(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_17(status); + (static_cast(context))->OnFailureResponse_17(chip::to_underlying(status)); } static void OnSuccessCallback_17(void * context, int16_t occupiedCoolingSetpoint) @@ -21312,9 +21171,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_17(occupiedCoolingSetpoint); } - static void OnFailureCallback_18(void * context, uint8_t status) + static void OnFailureCallback_18(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_18(status); + (static_cast(context))->OnFailureResponse_18(chip::to_underlying(status)); } static void OnSuccessCallback_18(void * context, int16_t occupiedCoolingSetpoint) @@ -21329,9 +21188,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_19(void * context) { (static_cast(context))->OnSuccessResponse_19(); } - static void OnFailureCallback_20(void * context, uint8_t status) + static void OnFailureCallback_20(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_20(status); + (static_cast(context))->OnFailureResponse_20(chip::to_underlying(status)); } static void OnSuccessCallback_20(void * context, int16_t occupiedCoolingSetpoint) @@ -21339,9 +21198,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_20(occupiedCoolingSetpoint); } - static void OnFailureCallback_21(void * context, uint8_t status) + static void OnFailureCallback_21(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_21(status); + (static_cast(context))->OnFailureResponse_21(chip::to_underlying(status)); } static void OnSuccessCallback_21(void * context, int16_t occupiedHeatingSetpoint) @@ -21349,9 +21208,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_21(occupiedHeatingSetpoint); } - static void OnFailureCallback_22(void * context, uint8_t status) + static void OnFailureCallback_22(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_22(status); + (static_cast(context))->OnFailureResponse_22(chip::to_underlying(status)); } static void OnSuccessCallback_22(void * context, int16_t occupiedHeatingSetpoint) @@ -21366,9 +21225,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_23(void * context) { (static_cast(context))->OnSuccessResponse_23(); } - static void OnFailureCallback_24(void * context, uint8_t status) + static void OnFailureCallback_24(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_24(status); + (static_cast(context))->OnFailureResponse_24(chip::to_underlying(status)); } static void OnSuccessCallback_24(void * context, int16_t occupiedHeatingSetpoint) @@ -21376,9 +21235,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_24(occupiedHeatingSetpoint); } - static void OnFailureCallback_25(void * context, uint8_t status) + static void OnFailureCallback_25(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_25(status); + (static_cast(context))->OnFailureResponse_25(chip::to_underlying(status)); } static void OnSuccessCallback_25(void * context, int16_t minHeatSetpointLimit) @@ -21386,9 +21245,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_25(minHeatSetpointLimit); } - static void OnFailureCallback_26(void * context, uint8_t status) + static void OnFailureCallback_26(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_26(status); + (static_cast(context))->OnFailureResponse_26(chip::to_underlying(status)); } static void OnSuccessCallback_26(void * context, int16_t minHeatSetpointLimit) @@ -21403,9 +21262,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_27(void * context) { (static_cast(context))->OnSuccessResponse_27(); } - static void OnFailureCallback_28(void * context, uint8_t status) + static void OnFailureCallback_28(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_28(status); + (static_cast(context))->OnFailureResponse_28(chip::to_underlying(status)); } static void OnSuccessCallback_28(void * context, int16_t minHeatSetpointLimit) @@ -21413,9 +21272,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_28(minHeatSetpointLimit); } - static void OnFailureCallback_29(void * context, uint8_t status) + static void OnFailureCallback_29(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_29(status); + (static_cast(context))->OnFailureResponse_29(chip::to_underlying(status)); } static void OnSuccessCallback_29(void * context, int16_t maxHeatSetpointLimit) @@ -21423,9 +21282,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_29(maxHeatSetpointLimit); } - static void OnFailureCallback_30(void * context, uint8_t status) + static void OnFailureCallback_30(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_30(status); + (static_cast(context))->OnFailureResponse_30(chip::to_underlying(status)); } static void OnSuccessCallback_30(void * context, int16_t maxHeatSetpointLimit) @@ -21440,9 +21299,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_31(void * context) { (static_cast(context))->OnSuccessResponse_31(); } - static void OnFailureCallback_32(void * context, uint8_t status) + static void OnFailureCallback_32(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_32(status); + (static_cast(context))->OnFailureResponse_32(chip::to_underlying(status)); } static void OnSuccessCallback_32(void * context, int16_t maxHeatSetpointLimit) @@ -21450,9 +21309,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_32(maxHeatSetpointLimit); } - static void OnFailureCallback_33(void * context, uint8_t status) + static void OnFailureCallback_33(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_33(status); + (static_cast(context))->OnFailureResponse_33(chip::to_underlying(status)); } static void OnSuccessCallback_33(void * context, int16_t minCoolSetpointLimit) @@ -21460,9 +21319,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_33(minCoolSetpointLimit); } - static void OnFailureCallback_34(void * context, uint8_t status) + static void OnFailureCallback_34(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_34(status); + (static_cast(context))->OnFailureResponse_34(chip::to_underlying(status)); } static void OnSuccessCallback_34(void * context, int16_t minCoolSetpointLimit) @@ -21477,9 +21336,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_35(void * context) { (static_cast(context))->OnSuccessResponse_35(); } - static void OnFailureCallback_36(void * context, uint8_t status) + static void OnFailureCallback_36(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_36(status); + (static_cast(context))->OnFailureResponse_36(chip::to_underlying(status)); } static void OnSuccessCallback_36(void * context, int16_t minCoolSetpointLimit) @@ -21487,9 +21346,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_36(minCoolSetpointLimit); } - static void OnFailureCallback_37(void * context, uint8_t status) + static void OnFailureCallback_37(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_37(status); + (static_cast(context))->OnFailureResponse_37(chip::to_underlying(status)); } static void OnSuccessCallback_37(void * context, int16_t maxCoolSetpointLimit) @@ -21497,9 +21356,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_37(maxCoolSetpointLimit); } - static void OnFailureCallback_38(void * context, uint8_t status) + static void OnFailureCallback_38(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_38(status); + (static_cast(context))->OnFailureResponse_38(chip::to_underlying(status)); } static void OnSuccessCallback_38(void * context, int16_t maxCoolSetpointLimit) @@ -21514,9 +21373,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_39(void * context) { (static_cast(context))->OnSuccessResponse_39(); } - static void OnFailureCallback_40(void * context, uint8_t status) + static void OnFailureCallback_40(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_40(status); + (static_cast(context))->OnFailureResponse_40(chip::to_underlying(status)); } static void OnSuccessCallback_40(void * context, int16_t maxCoolSetpointLimit) @@ -21524,9 +21383,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_40(maxCoolSetpointLimit); } - static void OnFailureCallback_41(void * context, uint8_t status) + static void OnFailureCallback_41(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_41(status); + (static_cast(context))->OnFailureResponse_41(chip::to_underlying(status)); } static void OnSuccessCallback_41(void * context, uint8_t controlSequenceOfOperation) @@ -21534,9 +21393,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_41(controlSequenceOfOperation); } - static void OnFailureCallback_42(void * context, uint8_t status) + static void OnFailureCallback_42(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_42(status); + (static_cast(context))->OnFailureResponse_42(chip::to_underlying(status)); } static void OnSuccessCallback_42(void * context, uint8_t controlSequenceOfOperation) @@ -21551,9 +21410,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_43(void * context) { (static_cast(context))->OnSuccessResponse_43(); } - static void OnFailureCallback_44(void * context, uint8_t status) + static void OnFailureCallback_44(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_44(status); + (static_cast(context))->OnFailureResponse_44(chip::to_underlying(status)); } static void OnSuccessCallback_44(void * context, uint8_t controlSequenceOfOperation) @@ -21561,9 +21420,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_44(controlSequenceOfOperation); } - static void OnFailureCallback_45(void * context, uint8_t status) + static void OnFailureCallback_45(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_45(status); + (static_cast(context))->OnFailureResponse_45(chip::to_underlying(status)); } static void OnSuccessCallback_45(void * context, uint8_t systemMode) @@ -21571,9 +21430,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_45(systemMode); } - static void OnFailureCallback_46(void * context, uint8_t status) + static void OnFailureCallback_46(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_46(status); + (static_cast(context))->OnFailureResponse_46(chip::to_underlying(status)); } static void OnSuccessCallback_46(void * context, uint8_t systemMode) @@ -21588,9 +21447,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_47(void * context) { (static_cast(context))->OnSuccessResponse_47(); } - static void OnFailureCallback_48(void * context, uint8_t status) + static void OnFailureCallback_48(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_48(status); + (static_cast(context))->OnFailureResponse_48(chip::to_underlying(status)); } static void OnSuccessCallback_48(void * context, uint8_t systemMode) @@ -21598,9 +21457,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_48(systemMode); } - static void OnFailureCallback_49(void * context, uint8_t status) + static void OnFailureCallback_49(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_49(status); + (static_cast(context))->OnFailureResponse_49(chip::to_underlying(status)); } static void OnSuccessCallback_49(void * context, int8_t minSetpointDeadBand) @@ -21608,9 +21467,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_49(minSetpointDeadBand); } - static void OnFailureCallback_50(void * context, uint8_t status) + static void OnFailureCallback_50(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_50(status); + (static_cast(context))->OnFailureResponse_50(chip::to_underlying(status)); } static void OnSuccessCallback_50(void * context, int8_t minSetpointDeadBand) @@ -21625,9 +21484,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_51(void * context) { (static_cast(context))->OnSuccessResponse_51(); } - static void OnFailureCallback_52(void * context, uint8_t status) + static void OnFailureCallback_52(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_52(status); + (static_cast(context))->OnFailureResponse_52(chip::to_underlying(status)); } static void OnSuccessCallback_52(void * context, int8_t minSetpointDeadBand) @@ -21635,9 +21494,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_52(minSetpointDeadBand); } - static void OnFailureCallback_53(void * context, uint8_t status) + static void OnFailureCallback_53(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_53(status); + (static_cast(context))->OnFailureResponse_53(chip::to_underlying(status)); } static void OnSuccessCallback_53(void * context, uint8_t startOfWeek) @@ -21652,9 +21511,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_54(void * context) { (static_cast(context))->OnSuccessResponse_54(); } - static void OnFailureCallback_55(void * context, uint8_t status) + static void OnFailureCallback_55(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_55(status); + (static_cast(context))->OnFailureResponse_55(chip::to_underlying(status)); } static void OnSuccessCallback_55(void * context, uint8_t startOfWeek) @@ -21662,9 +21521,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand (static_cast(context))->OnSuccessResponse_55(startOfWeek); } - static void OnFailureCallback_56(void * context, uint8_t status) + static void OnFailureCallback_56(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_56(status); + (static_cast(context))->OnFailureResponse_56(chip::to_underlying(status)); } static void OnSuccessCallback_56(void * context, uint8_t numberOfWeeklyTransitions) @@ -21679,9 +21538,9 @@ class Test_TC_TSTAT_2_1 : public TestCommand static void OnSuccessCallback_57(void * context) { (static_cast(context))->OnSuccessResponse_57(); } - static void OnFailureCallback_58(void * context, uint8_t status) + static void OnFailureCallback_58(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_58(status); + (static_cast(context))->OnFailureResponse_58(chip::to_underlying(status)); } static void OnSuccessCallback_58(void * context, uint8_t numberOfDailyTransitions) @@ -21705,7 +21564,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeLocalTemperature(mOnSuccessCallback_0.Cancel(), mOnFailureCallback_0.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_0, OnFailureCallback_0); } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -21721,7 +21581,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMinHeatSetpointLimit(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1); } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -21737,7 +21598,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMinHeatSetpointLimit(mOnSuccessCallback_2.Cancel(), mOnFailureCallback_2.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2); } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -21771,7 +21633,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMinHeatSetpointLimit(mOnSuccessCallback_4.Cancel(), mOnFailureCallback_4.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4); } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -21787,7 +21650,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMaxHeatSetpointLimit(mOnSuccessCallback_5.Cancel(), mOnFailureCallback_5.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5); } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } @@ -21803,7 +21667,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMaxHeatSetpointLimit(mOnSuccessCallback_6.Cancel(), mOnFailureCallback_6.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6); } void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } @@ -21837,7 +21702,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMaxHeatSetpointLimit(mOnSuccessCallback_8.Cancel(), mOnFailureCallback_8.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8); } void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } @@ -21853,7 +21719,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMinCoolSetpointLimit(mOnSuccessCallback_9.Cancel(), mOnFailureCallback_9.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9); } void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } @@ -21869,7 +21736,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMinCoolSetpointLimit(mOnSuccessCallback_10.Cancel(), mOnFailureCallback_10.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10); } void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } @@ -21903,7 +21771,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMinCoolSetpointLimit(mOnSuccessCallback_12.Cancel(), mOnFailureCallback_12.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12); } void OnFailureResponse_12(uint8_t status) { ThrowFailureResponse(); } @@ -21919,7 +21788,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMaxCoolSetpointLimit(mOnSuccessCallback_13.Cancel(), mOnFailureCallback_13.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13); } void OnFailureResponse_13(uint8_t status) { ThrowFailureResponse(); } @@ -21935,7 +21805,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMaxCoolSetpointLimit(mOnSuccessCallback_14.Cancel(), mOnFailureCallback_14.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14); } void OnFailureResponse_14(uint8_t status) { ThrowFailureResponse(); } @@ -21969,7 +21840,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeAbsMaxCoolSetpointLimit(mOnSuccessCallback_16.Cancel(), mOnFailureCallback_16.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16); } void OnFailureResponse_16(uint8_t status) { ThrowFailureResponse(); } @@ -21985,7 +21857,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeOccupiedCoolingSetpoint(mOnSuccessCallback_17.Cancel(), mOnFailureCallback_17.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_17, OnFailureCallback_17); } void OnFailureResponse_17(uint8_t status) { ThrowFailureResponse(); } @@ -22001,7 +21874,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeOccupiedCoolingSetpoint(mOnSuccessCallback_18.Cancel(), mOnFailureCallback_18.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18); } void OnFailureResponse_18(uint8_t status) { ThrowFailureResponse(); } @@ -22035,7 +21909,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeOccupiedCoolingSetpoint(mOnSuccessCallback_20.Cancel(), mOnFailureCallback_20.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20); } void OnFailureResponse_20(uint8_t status) { ThrowFailureResponse(); } @@ -22051,7 +21926,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeOccupiedHeatingSetpoint(mOnSuccessCallback_21.Cancel(), mOnFailureCallback_21.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_21, OnFailureCallback_21); } void OnFailureResponse_21(uint8_t status) { ThrowFailureResponse(); } @@ -22067,7 +21943,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeOccupiedHeatingSetpoint(mOnSuccessCallback_22.Cancel(), mOnFailureCallback_22.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_22, OnFailureCallback_22); } void OnFailureResponse_22(uint8_t status) { ThrowFailureResponse(); } @@ -22101,7 +21978,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeOccupiedHeatingSetpoint(mOnSuccessCallback_24.Cancel(), mOnFailureCallback_24.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_24, OnFailureCallback_24); } void OnFailureResponse_24(uint8_t status) { ThrowFailureResponse(); } @@ -22117,7 +21995,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMinHeatSetpointLimit(mOnSuccessCallback_25.Cancel(), mOnFailureCallback_25.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_25, OnFailureCallback_25); } void OnFailureResponse_25(uint8_t status) { ThrowFailureResponse(); } @@ -22133,7 +22012,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMinHeatSetpointLimit(mOnSuccessCallback_26.Cancel(), mOnFailureCallback_26.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_26, OnFailureCallback_26); } void OnFailureResponse_26(uint8_t status) { ThrowFailureResponse(); } @@ -22167,7 +22047,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMinHeatSetpointLimit(mOnSuccessCallback_28.Cancel(), mOnFailureCallback_28.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_28, OnFailureCallback_28); } void OnFailureResponse_28(uint8_t status) { ThrowFailureResponse(); } @@ -22183,7 +22064,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMaxHeatSetpointLimit(mOnSuccessCallback_29.Cancel(), mOnFailureCallback_29.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_29, OnFailureCallback_29); } void OnFailureResponse_29(uint8_t status) { ThrowFailureResponse(); } @@ -22199,7 +22081,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMaxHeatSetpointLimit(mOnSuccessCallback_30.Cancel(), mOnFailureCallback_30.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_30, OnFailureCallback_30); } void OnFailureResponse_30(uint8_t status) { ThrowFailureResponse(); } @@ -22233,7 +22116,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMaxHeatSetpointLimit(mOnSuccessCallback_32.Cancel(), mOnFailureCallback_32.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_32, OnFailureCallback_32); } void OnFailureResponse_32(uint8_t status) { ThrowFailureResponse(); } @@ -22249,7 +22133,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMinCoolSetpointLimit(mOnSuccessCallback_33.Cancel(), mOnFailureCallback_33.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_33, OnFailureCallback_33); } void OnFailureResponse_33(uint8_t status) { ThrowFailureResponse(); } @@ -22265,7 +22150,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMinCoolSetpointLimit(mOnSuccessCallback_34.Cancel(), mOnFailureCallback_34.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_34, OnFailureCallback_34); } void OnFailureResponse_34(uint8_t status) { ThrowFailureResponse(); } @@ -22299,7 +22185,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMinCoolSetpointLimit(mOnSuccessCallback_36.Cancel(), mOnFailureCallback_36.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_36, OnFailureCallback_36); } void OnFailureResponse_36(uint8_t status) { ThrowFailureResponse(); } @@ -22315,7 +22202,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMaxCoolSetpointLimit(mOnSuccessCallback_37.Cancel(), mOnFailureCallback_37.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_37, OnFailureCallback_37); } void OnFailureResponse_37(uint8_t status) { ThrowFailureResponse(); } @@ -22331,7 +22219,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMaxCoolSetpointLimit(mOnSuccessCallback_38.Cancel(), mOnFailureCallback_38.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_38, OnFailureCallback_38); } void OnFailureResponse_38(uint8_t status) { ThrowFailureResponse(); } @@ -22365,7 +22254,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMaxCoolSetpointLimit(mOnSuccessCallback_40.Cancel(), mOnFailureCallback_40.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_40, OnFailureCallback_40); } void OnFailureResponse_40(uint8_t status) { ThrowFailureResponse(); } @@ -22381,7 +22271,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeControlSequenceOfOperation(mOnSuccessCallback_41.Cancel(), mOnFailureCallback_41.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_41, OnFailureCallback_41); } void OnFailureResponse_41(uint8_t status) { ThrowFailureResponse(); } @@ -22397,7 +22288,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeControlSequenceOfOperation(mOnSuccessCallback_42.Cancel(), mOnFailureCallback_42.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_42, OnFailureCallback_42); } void OnFailureResponse_42(uint8_t status) { ThrowFailureResponse(); } @@ -22430,7 +22322,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeControlSequenceOfOperation(mOnSuccessCallback_44.Cancel(), mOnFailureCallback_44.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_44, OnFailureCallback_44); } void OnFailureResponse_44(uint8_t status) { ThrowFailureResponse(); } @@ -22446,7 +22339,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeSystemMode(mOnSuccessCallback_45.Cancel(), mOnFailureCallback_45.Cancel()); + return cluster.ReadAttribute(this, OnSuccessCallback_45, + OnFailureCallback_45); } void OnFailureResponse_45(uint8_t status) { ThrowFailureResponse(); } @@ -22462,7 +22356,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeSystemMode(mOnSuccessCallback_46.Cancel(), mOnFailureCallback_46.Cancel()); + return cluster.ReadAttribute(this, OnSuccessCallback_46, + OnFailureCallback_46); } void OnFailureResponse_46(uint8_t status) { ThrowFailureResponse(); } @@ -22495,7 +22390,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeSystemMode(mOnSuccessCallback_48.Cancel(), mOnFailureCallback_48.Cancel()); + return cluster.ReadAttribute(this, OnSuccessCallback_48, + OnFailureCallback_48); } void OnFailureResponse_48(uint8_t status) { ThrowFailureResponse(); } @@ -22511,7 +22407,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMinSetpointDeadBand(mOnSuccessCallback_49.Cancel(), mOnFailureCallback_49.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_49, OnFailureCallback_49); } void OnFailureResponse_49(uint8_t status) { ThrowFailureResponse(); } @@ -22527,7 +22424,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMinSetpointDeadBand(mOnSuccessCallback_50.Cancel(), mOnFailureCallback_50.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_50, OnFailureCallback_50); } void OnFailureResponse_50(uint8_t status) { ThrowFailureResponse(); } @@ -22560,7 +22458,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeMinSetpointDeadBand(mOnSuccessCallback_52.Cancel(), mOnFailureCallback_52.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_52, OnFailureCallback_52); } void OnFailureResponse_52(uint8_t status) { ThrowFailureResponse(); } @@ -22576,7 +22475,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeStartOfWeek(mOnSuccessCallback_53.Cancel(), mOnFailureCallback_53.Cancel()); + return cluster.ReadAttribute(this, OnSuccessCallback_53, + OnFailureCallback_53); } void OnFailureResponse_53(uint8_t status) { ThrowFailureResponse(); } @@ -22609,7 +22509,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeStartOfWeek(mOnSuccessCallback_55.Cancel(), mOnFailureCallback_55.Cancel()); + return cluster.ReadAttribute(this, OnSuccessCallback_55, + OnFailureCallback_55); } void OnFailureResponse_55(uint8_t status) { ThrowFailureResponse(); } @@ -22625,7 +22526,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeNumberOfWeeklyTransitions(mOnSuccessCallback_56.Cancel(), mOnFailureCallback_56.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_56, OnFailureCallback_56); } void OnFailureResponse_56(uint8_t status) { ThrowFailureResponse(); } @@ -22657,7 +22559,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevice, 1); - return cluster.ReadAttributeNumberOfDailyTransitions(mOnSuccessCallback_58.Cancel(), mOnFailureCallback_58.Cancel()); + return cluster.ReadAttribute( + this, OnSuccessCallback_58, OnFailureCallback_58); } void OnFailureResponse_58(uint8_t status) { ThrowFailureResponse(); } @@ -30632,462 +30535,3445 @@ class TestClusterComplexTypes : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 10 : Send Test Command with optional arg set to null.\n"); err = TestSendTestCommandWithOptionalArgSetToNull_10(); break; - } - - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; - - // - // Tests methods - // - - CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_0() - { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - - using requestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; - using responseType = chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType; - - chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type 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_string"), strlen("octet_string")); - request.arg1.e = chip::Span("char_string", strlen("char_string")); - request.arg1.f = static_cast>(1); - - auto success = [](void * context, const responseType & data) { - (static_cast(context))->OnSuccessResponse_0(data.value); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_0(status); - }; - return cluster.InvokeCommand(request, this, success, failure); - } - - void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_0(bool value) - { - VerifyOrReturn(CheckValue("value", value, true)); - NextTest(); - } - - CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_1() - { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - - using requestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; - using responseType = chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType; - - chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type 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_string"), strlen("octet_string")); - request.arg1.e = chip::Span("char_string", strlen("char_string")); - request.arg1.f = static_cast>(1); - - auto success = [](void * context, const responseType & data) { - (static_cast(context))->OnSuccessResponse_1(data.value); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_1(status); - }; - return cluster.InvokeCommand(request, this, success, failure); - } - - void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_1(bool value) - { - VerifyOrReturn(CheckValue("value", value, false)); - NextTest(); - } - - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_2() - { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - - using requestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; - using responseType = chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType; - - chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type 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 responseType & data) { - (static_cast(context))->OnSuccessResponse_2(data.value); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); - }; - return cluster.InvokeCommand(request, this, success, failure); - } - - void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } - - void OnSuccessResponse_2(bool value) - { - VerifyOrReturn(CheckValue("value", value, true)); - NextTest(); - } - - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_3() - { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Write attribute NULLABLE_BOOLEAN null\n"); + err = TestWriteAttributeNullableBooleanNull_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read attribute NULLABLE_BOOLEAN null\n"); + err = TestReadAttributeNullableBooleanNull_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Write attribute NULLABLE_BOOLEAN True\n"); + err = TestWriteAttributeNullableBooleanTrue_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read attribute NULLABLE_BOOLEAN True\n"); + err = TestReadAttributeNullableBooleanTrue_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Write attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestWriteAttributeNullableBitmap8MaxValue_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestReadAttributeNullableBitmap8MaxValue_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute NULLABLE_BITMAP8 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap8InvalidValue_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute NULLABLE_BITMAP8 unchanged Value\n"); + err = TestReadAttributeNullableBitmap8UnchangedValue_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Write attribute NULLABLE_BITMAP8 null Value\n"); + err = TestWriteAttributeNullableBitmap8NullValue_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read attribute NULLABLE_BITMAP8 null Value\n"); + err = TestReadAttributeNullableBitmap8NullValue_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Write attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestWriteAttributeNullableBitmap16MaxValue_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Read attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestReadAttributeNullableBitmap16MaxValue_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Write attribute NULLABLE_BITMAP16 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap16InvalidValue_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Read attribute NULLABLE_BITMAP16 unchanged Value\n"); + err = TestReadAttributeNullableBitmap16UnchangedValue_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Write attribute NULLABLE_BITMAP16 null Value\n"); + err = TestWriteAttributeNullableBitmap16NullValue_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Read attribute NULLABLE_BITMAP16 null Value\n"); + err = TestReadAttributeNullableBitmap16NullValue_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Write attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestWriteAttributeNullableBitmap32MaxValue_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Read attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestReadAttributeNullableBitmap32MaxValue_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Write attribute NULLABLE_BITMAP32 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap32InvalidValue_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Read attribute NULLABLE_BITMAP32 unchanged Value\n"); + err = TestReadAttributeNullableBitmap32UnchangedValue_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Write attribute NULLABLE_BITMAP32 null Value\n"); + err = TestWriteAttributeNullableBitmap32NullValue_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Read attribute NULLABLE_BITMAP32 null Value\n"); + err = TestReadAttributeNullableBitmap32NullValue_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Write attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestWriteAttributeNullableBitmap64MaxValue_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Read attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestReadAttributeNullableBitmap64MaxValue_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Write attribute NULLABLE_BITMAP64 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap64InvalidValue_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Read attribute NULLABLE_BITMAP64 unchanged Value\n"); + err = TestReadAttributeNullableBitmap64UnchangedValue_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Write attribute NULLABLE_BITMAP64 null Value\n"); + err = TestWriteAttributeNullableBitmap64NullValue_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Read attribute NULLABLE_BITMAP64 null Value\n"); + err = TestReadAttributeNullableBitmap64NullValue_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Write attribute NULLABLE_INT8U Max Value\n"); + err = TestWriteAttributeNullableInt8uMaxValue_39(); + break; + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : Read attribute NULLABLE_INT8U Max Value\n"); + err = TestReadAttributeNullableInt8uMaxValue_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : Write attribute NULLABLE_INT8U Invalid Value\n"); + err = TestWriteAttributeNullableInt8uInvalidValue_41(); + break; + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : Read attribute NULLABLE_INT8U unchanged Value\n"); + err = TestReadAttributeNullableInt8uUnchangedValue_42(); + break; + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : Write attribute NULLABLE_INT8U null Value\n"); + err = TestWriteAttributeNullableInt8uNullValue_43(); + break; + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : Read attribute NULLABLE_INT8U null Value\n"); + err = TestReadAttributeNullableInt8uNullValue_44(); + break; + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : Write attribute NULLABLE_INT16U Max Value\n"); + err = TestWriteAttributeNullableInt16uMaxValue_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : Read attribute NULLABLE_INT16U Max Value\n"); + err = TestReadAttributeNullableInt16uMaxValue_46(); + break; + case 47: + ChipLogProgress(chipTool, " ***** Test Step 47 : Write attribute NULLABLE_INT16U Invalid Value\n"); + err = TestWriteAttributeNullableInt16uInvalidValue_47(); + break; + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : Read attribute NULLABLE_INT16U unchanged Value\n"); + err = TestReadAttributeNullableInt16uUnchangedValue_48(); + break; + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : Write attribute NULLABLE_INT16U null Value\n"); + err = TestWriteAttributeNullableInt16uNullValue_49(); + break; + case 50: + ChipLogProgress(chipTool, " ***** Test Step 50 : Read attribute NULLABLE_INT16U null Value\n"); + err = TestReadAttributeNullableInt16uNullValue_50(); + break; + case 51: + ChipLogProgress(chipTool, " ***** Test Step 51 : Write attribute NULLABLE_INT32U Max Value\n"); + err = TestWriteAttributeNullableInt32uMaxValue_51(); + break; + case 52: + ChipLogProgress(chipTool, " ***** Test Step 52 : Read attribute NULLABLE_INT32U Max Value\n"); + err = TestReadAttributeNullableInt32uMaxValue_52(); + break; + case 53: + ChipLogProgress(chipTool, " ***** Test Step 53 : Write attribute NULLABLE_INT32U Invalid Value\n"); + err = TestWriteAttributeNullableInt32uInvalidValue_53(); + break; + case 54: + ChipLogProgress(chipTool, " ***** Test Step 54 : Read attribute NULLABLE_INT32U unchanged Value\n"); + err = TestReadAttributeNullableInt32uUnchangedValue_54(); + break; + case 55: + ChipLogProgress(chipTool, " ***** Test Step 55 : Write attribute NULLABLE_INT32U null Value\n"); + err = TestWriteAttributeNullableInt32uNullValue_55(); + break; + case 56: + ChipLogProgress(chipTool, " ***** Test Step 56 : Read attribute NULLABLE_INT32U null Value\n"); + err = TestReadAttributeNullableInt32uNullValue_56(); + break; + case 57: + ChipLogProgress(chipTool, " ***** Test Step 57 : Write attribute NULLABLE_INT64U Max Value\n"); + err = TestWriteAttributeNullableInt64uMaxValue_57(); + break; + case 58: + ChipLogProgress(chipTool, " ***** Test Step 58 : Read attribute NULLABLE_INT64U Max Value\n"); + err = TestReadAttributeNullableInt64uMaxValue_58(); + break; + case 59: + ChipLogProgress(chipTool, " ***** Test Step 59 : Write attribute NULLABLE_INT64U Invalid Value\n"); + err = TestWriteAttributeNullableInt64uInvalidValue_59(); + break; + case 60: + ChipLogProgress(chipTool, " ***** Test Step 60 : Read attribute NULLABLE_INT64U unchanged Value\n"); + err = TestReadAttributeNullableInt64uUnchangedValue_60(); + break; + case 61: + ChipLogProgress(chipTool, " ***** Test Step 61 : Write attribute NULLABLE_INT64U null Value\n"); + err = TestWriteAttributeNullableInt64uNullValue_61(); + break; + case 62: + ChipLogProgress(chipTool, " ***** Test Step 62 : Read attribute NULLABLE_INT64U null Value\n"); + err = TestReadAttributeNullableInt64uNullValue_62(); + break; + case 63: + ChipLogProgress(chipTool, " ***** Test Step 63 : Write attribute NULLABLE_INT8S Min Value\n"); + err = TestWriteAttributeNullableInt8sMinValue_63(); + break; + case 64: + ChipLogProgress(chipTool, " ***** Test Step 64 : Read attribute NULLABLE_INT8S Min Value\n"); + err = TestReadAttributeNullableInt8sMinValue_64(); + break; + case 65: + ChipLogProgress(chipTool, " ***** Test Step 65 : Write attribute NULLABLE_INT8S Invalid Value\n"); + err = TestWriteAttributeNullableInt8sInvalidValue_65(); + break; + case 66: + ChipLogProgress(chipTool, " ***** Test Step 66 : Read attribute NULLABLE_INT8S unchanged Value\n"); + err = TestReadAttributeNullableInt8sUnchangedValue_66(); + break; + case 67: + ChipLogProgress(chipTool, " ***** Test Step 67 : Write attribute NULLABLE_INT8S null Value\n"); + err = TestWriteAttributeNullableInt8sNullValue_67(); + break; + case 68: + ChipLogProgress(chipTool, " ***** Test Step 68 : Read attribute NULLABLE_INT8S null Value\n"); + err = TestReadAttributeNullableInt8sNullValue_68(); + break; + case 69: + ChipLogProgress(chipTool, " ***** Test Step 69 : Write attribute NULLABLE_INT16S Min Value\n"); + err = TestWriteAttributeNullableInt16sMinValue_69(); + break; + case 70: + ChipLogProgress(chipTool, " ***** Test Step 70 : Read attribute NULLABLE_INT16S Min Value\n"); + err = TestReadAttributeNullableInt16sMinValue_70(); + break; + case 71: + ChipLogProgress(chipTool, " ***** Test Step 71 : Write attribute NULLABLE_INT16S Invalid Value\n"); + err = TestWriteAttributeNullableInt16sInvalidValue_71(); + break; + case 72: + ChipLogProgress(chipTool, " ***** Test Step 72 : Read attribute NULLABLE_INT16S unchanged Value\n"); + err = TestReadAttributeNullableInt16sUnchangedValue_72(); + break; + case 73: + ChipLogProgress(chipTool, " ***** Test Step 73 : Write attribute NULLABLE_INT16S null Value\n"); + err = TestWriteAttributeNullableInt16sNullValue_73(); + break; + case 74: + ChipLogProgress(chipTool, " ***** Test Step 74 : Read attribute NULLABLE_INT16S null Value\n"); + err = TestReadAttributeNullableInt16sNullValue_74(); + break; + case 75: + ChipLogProgress(chipTool, " ***** Test Step 75 : Write attribute NULLABLE_INT32S Min Value\n"); + err = TestWriteAttributeNullableInt32sMinValue_75(); + break; + case 76: + ChipLogProgress(chipTool, " ***** Test Step 76 : Read attribute NULLABLE_INT32S Min Value\n"); + err = TestReadAttributeNullableInt32sMinValue_76(); + break; + case 77: + ChipLogProgress(chipTool, " ***** Test Step 77 : Write attribute NULLABLE_INT32S Invalid Value\n"); + err = TestWriteAttributeNullableInt32sInvalidValue_77(); + break; + case 78: + ChipLogProgress(chipTool, " ***** Test Step 78 : Read attribute NULLABLE_INT32S unchanged Value\n"); + err = TestReadAttributeNullableInt32sUnchangedValue_78(); + break; + case 79: + ChipLogProgress(chipTool, " ***** Test Step 79 : Write attribute NULLABLE_INT32S null Value\n"); + err = TestWriteAttributeNullableInt32sNullValue_79(); + break; + case 80: + ChipLogProgress(chipTool, " ***** Test Step 80 : Read attribute NULLABLE_INT32S null Value\n"); + err = TestReadAttributeNullableInt32sNullValue_80(); + break; + case 81: + ChipLogProgress(chipTool, " ***** Test Step 81 : Write attribute NULLABLE_INT64S Min Value\n"); + err = TestWriteAttributeNullableInt64sMinValue_81(); + break; + case 82: + ChipLogProgress(chipTool, " ***** Test Step 82 : Read attribute NULLABLE_INT64S Min Value\n"); + err = TestReadAttributeNullableInt64sMinValue_82(); + break; + case 83: + ChipLogProgress(chipTool, " ***** Test Step 83 : Write attribute NULLABLE_INT64S Invalid Value\n"); + err = TestWriteAttributeNullableInt64sInvalidValue_83(); + break; + case 84: + ChipLogProgress(chipTool, " ***** Test Step 84 : Read attribute NULLABLE_INT64S unchanged Value\n"); + err = TestReadAttributeNullableInt64sUnchangedValue_84(); + break; + case 85: + ChipLogProgress(chipTool, " ***** Test Step 85 : Write attribute NULLABLE_INT64S null Value\n"); + err = TestWriteAttributeNullableInt64sNullValue_85(); + break; + case 86: + ChipLogProgress(chipTool, " ***** Test Step 86 : Read attribute NULLABLE_INT64S null Value\n"); + err = TestReadAttributeNullableInt64sNullValue_86(); + break; + case 87: + ChipLogProgress(chipTool, " ***** Test Step 87 : Write attribute NULLABLE_ENUM8 Max Value\n"); + err = TestWriteAttributeNullableEnum8MaxValue_87(); + break; + case 88: + ChipLogProgress(chipTool, " ***** Test Step 88 : Read attribute NULLABLE_ENUM8 Max Value\n"); + err = TestReadAttributeNullableEnum8MaxValue_88(); + break; + case 89: + ChipLogProgress(chipTool, " ***** Test Step 89 : Write attribute NULLABLE_ENUM8 Invalid Value\n"); + err = TestWriteAttributeNullableEnum8InvalidValue_89(); + break; + case 90: + ChipLogProgress(chipTool, " ***** Test Step 90 : Read attribute NULLABLE_ENUM8 unchanged Value\n"); + err = TestReadAttributeNullableEnum8UnchangedValue_90(); + break; + case 91: + ChipLogProgress(chipTool, " ***** Test Step 91 : Write attribute NULLABLE_ENUM8 null Value\n"); + err = TestWriteAttributeNullableEnum8NullValue_91(); + break; + case 92: + ChipLogProgress(chipTool, " ***** Test Step 92 : Read attribute NULLABLE_ENUM8 null Value\n"); + err = TestReadAttributeNullableEnum8NullValue_92(); + break; + case 93: + ChipLogProgress(chipTool, " ***** Test Step 93 : Write attribute NULLABLE_ENUM16 Max Value\n"); + err = TestWriteAttributeNullableEnum16MaxValue_93(); + break; + case 94: + ChipLogProgress(chipTool, " ***** Test Step 94 : Read attribute NULLABLE_ENUM16 Max Value\n"); + err = TestReadAttributeNullableEnum16MaxValue_94(); + break; + case 95: + ChipLogProgress(chipTool, " ***** Test Step 95 : Write attribute NULLABLE_ENUM16 Invalid Value\n"); + err = TestWriteAttributeNullableEnum16InvalidValue_95(); + break; + case 96: + ChipLogProgress(chipTool, " ***** Test Step 96 : Read attribute NULLABLE_ENUM16 unchanged Value\n"); + err = TestReadAttributeNullableEnum16UnchangedValue_96(); + break; + case 97: + ChipLogProgress(chipTool, " ***** Test Step 97 : Write attribute NULLABLE_ENUM16 null Value\n"); + err = TestWriteAttributeNullableEnum16NullValue_97(); + break; + case 98: + ChipLogProgress(chipTool, " ***** Test Step 98 : Read attribute NULLABLE_ENUM16 null Value\n"); + err = TestReadAttributeNullableEnum16NullValue_98(); + break; + case 99: + ChipLogProgress(chipTool, " ***** Test Step 99 : Read attribute NULLABLE_OCTET_STRING Default Value\n"); + err = TestReadAttributeNullableOctetStringDefaultValue_99(); + break; + case 100: + ChipLogProgress(chipTool, " ***** Test Step 100 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_100(); + break; + case 101: + ChipLogProgress(chipTool, " ***** Test Step 101 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_101(); + break; + case 102: + ChipLogProgress(chipTool, " ***** Test Step 102 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_102(); + break; + case 103: + ChipLogProgress(chipTool, " ***** Test Step 103 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_103(); + break; + case 104: + ChipLogProgress(chipTool, " ***** Test Step 104 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_104(); + break; + case 105: + ChipLogProgress(chipTool, " ***** Test Step 105 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_105(); + break; + case 106: + ChipLogProgress(chipTool, " ***** Test Step 106 : Read attribute NULLABLE_CHAR_STRING Default Value\n"); + err = TestReadAttributeNullableCharStringDefaultValue_106(); + break; + case 107: + ChipLogProgress(chipTool, " ***** Test Step 107 : Write attribute NULLABLE_CHAR_STRING\n"); + err = TestWriteAttributeNullableCharString_107(); + break; + case 108: + ChipLogProgress(chipTool, " ***** Test Step 108 : Write attribute NULLABLE_CHAR_STRING - Value too long\n"); + err = TestWriteAttributeNullableCharStringValueTooLong_108(); + break; + case 109: + ChipLogProgress(chipTool, " ***** Test Step 109 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_109(); + break; + case 110: + ChipLogProgress(chipTool, " ***** Test Step 110 : Write attribute NULLABLE_CHAR_STRING - Empty\n"); + err = TestWriteAttributeNullableCharStringEmpty_110(); + break; + case 111: + ChipLogProgress(chipTool, " ***** Test Step 111 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_111(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 112; + + static void OnFailureCallback_11(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_11(chip::to_underlying(status)); + } + + 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, const chip::app::DataModel::Nullable & nullableBoolean) + { + (static_cast(context))->OnSuccessResponse_12(nullableBoolean); + } + + static void OnFailureCallback_13(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_13(chip::to_underlying(status)); + } + + 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 & nullableBoolean) + { + (static_cast(context))->OnSuccessResponse_14(nullableBoolean); + } + + 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_16(nullableBitmap8); + } + + static void OnFailureCallback_17(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_17(chip::to_underlying(status)); + } + + static void OnSuccessCallback_17(void * context) { (static_cast(context))->OnSuccessResponse_17(); } + + static void OnFailureCallback_18(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_18(chip::to_underlying(status)); + } + + static void OnSuccessCallback_18(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + { + (static_cast(context))->OnSuccessResponse_18(nullableBitmap8); + } + + static void OnFailureCallback_19(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_19(chip::to_underlying(status)); + } + + static void OnSuccessCallback_19(void * context) { (static_cast(context))->OnSuccessResponse_19(); } + + static void OnFailureCallback_20(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_20(chip::to_underlying(status)); + } + + static void OnSuccessCallback_20(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + { + (static_cast(context))->OnSuccessResponse_20(nullableBitmap8); + } + + static void OnFailureCallback_21(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_21(chip::to_underlying(status)); + } + + static void OnSuccessCallback_21(void * context) { (static_cast(context))->OnSuccessResponse_21(); } + + static void OnFailureCallback_22(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_22(chip::to_underlying(status)); + } + + static void OnSuccessCallback_22(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + { + (static_cast(context))->OnSuccessResponse_22(nullableBitmap16); + } + + static void OnFailureCallback_23(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_23(chip::to_underlying(status)); + } + + static void OnSuccessCallback_23(void * context) { (static_cast(context))->OnSuccessResponse_23(); } + + static void OnFailureCallback_24(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_24(chip::to_underlying(status)); + } + + static void OnSuccessCallback_24(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + { + (static_cast(context))->OnSuccessResponse_24(nullableBitmap16); + } + + static void OnFailureCallback_25(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_25(chip::to_underlying(status)); + } + + static void OnSuccessCallback_25(void * context) { (static_cast(context))->OnSuccessResponse_25(); } + + static void OnFailureCallback_26(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_26(chip::to_underlying(status)); + } + + static void OnSuccessCallback_26(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + { + (static_cast(context))->OnSuccessResponse_26(nullableBitmap16); + } + + static void OnFailureCallback_27(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_27(chip::to_underlying(status)); + } + + static void OnSuccessCallback_27(void * context) { (static_cast(context))->OnSuccessResponse_27(); } + + static void OnFailureCallback_28(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_28(chip::to_underlying(status)); + } + + static void OnSuccessCallback_28(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + { + (static_cast(context))->OnSuccessResponse_28(nullableBitmap32); + } + + static void OnFailureCallback_29(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_29(chip::to_underlying(status)); + } + + static void OnSuccessCallback_29(void * context) { (static_cast(context))->OnSuccessResponse_29(); } + + static void OnFailureCallback_30(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_30(chip::to_underlying(status)); + } + + static void OnSuccessCallback_30(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + { + (static_cast(context))->OnSuccessResponse_30(nullableBitmap32); + } + + static void OnFailureCallback_31(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_31(chip::to_underlying(status)); + } + + static void OnSuccessCallback_31(void * context) { (static_cast(context))->OnSuccessResponse_31(); } + + static void OnFailureCallback_32(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_32(chip::to_underlying(status)); + } + + static void OnSuccessCallback_32(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + { + (static_cast(context))->OnSuccessResponse_32(nullableBitmap32); + } + + static void OnFailureCallback_33(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_33(chip::to_underlying(status)); + } + + static void OnSuccessCallback_33(void * context) { (static_cast(context))->OnSuccessResponse_33(); } + + static void OnFailureCallback_34(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_34(chip::to_underlying(status)); + } + + static void OnSuccessCallback_34(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + { + (static_cast(context))->OnSuccessResponse_34(nullableBitmap64); + } + + static void OnFailureCallback_35(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_35(chip::to_underlying(status)); + } + + static void OnSuccessCallback_35(void * context) { (static_cast(context))->OnSuccessResponse_35(); } + + static void OnFailureCallback_36(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_36(chip::to_underlying(status)); + } + + static void OnSuccessCallback_36(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + { + (static_cast(context))->OnSuccessResponse_36(nullableBitmap64); + } + + static void OnFailureCallback_37(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_37(chip::to_underlying(status)); + } + + static void OnSuccessCallback_37(void * context) { (static_cast(context))->OnSuccessResponse_37(); } + + static void OnFailureCallback_38(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_38(chip::to_underlying(status)); + } + + static void OnSuccessCallback_38(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + { + (static_cast(context))->OnSuccessResponse_38(nullableBitmap64); + } + + static void OnFailureCallback_39(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_39(chip::to_underlying(status)); + } + + static void OnSuccessCallback_39(void * context) { (static_cast(context))->OnSuccessResponse_39(); } + + static void OnFailureCallback_40(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_40(chip::to_underlying(status)); + } + + static void OnSuccessCallback_40(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + { + (static_cast(context))->OnSuccessResponse_40(nullableInt8u); + } + + static void OnFailureCallback_41(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_41(chip::to_underlying(status)); + } + + static void OnSuccessCallback_41(void * context) { (static_cast(context))->OnSuccessResponse_41(); } + + static void OnFailureCallback_42(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_42(chip::to_underlying(status)); + } + + static void OnSuccessCallback_42(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + { + (static_cast(context))->OnSuccessResponse_42(nullableInt8u); + } + + static void OnFailureCallback_43(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_43(chip::to_underlying(status)); + } + + static void OnSuccessCallback_43(void * context) { (static_cast(context))->OnSuccessResponse_43(); } + + static void OnFailureCallback_44(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_44(chip::to_underlying(status)); + } + + static void OnSuccessCallback_44(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + { + (static_cast(context))->OnSuccessResponse_44(nullableInt8u); + } + + static void OnFailureCallback_45(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_45(chip::to_underlying(status)); + } + + static void OnSuccessCallback_45(void * context) { (static_cast(context))->OnSuccessResponse_45(); } + + static void OnFailureCallback_46(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_46(chip::to_underlying(status)); + } + + static void OnSuccessCallback_46(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + { + (static_cast(context))->OnSuccessResponse_46(nullableInt16u); + } + + static void OnFailureCallback_47(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_47(chip::to_underlying(status)); + } + + static void OnSuccessCallback_47(void * context) { (static_cast(context))->OnSuccessResponse_47(); } + + static void OnFailureCallback_48(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_48(chip::to_underlying(status)); + } + + static void OnSuccessCallback_48(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + { + (static_cast(context))->OnSuccessResponse_48(nullableInt16u); + } + + static void OnFailureCallback_49(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_49(chip::to_underlying(status)); + } + + static void OnSuccessCallback_49(void * context) { (static_cast(context))->OnSuccessResponse_49(); } + + static void OnFailureCallback_50(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_50(chip::to_underlying(status)); + } + + static void OnSuccessCallback_50(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + { + (static_cast(context))->OnSuccessResponse_50(nullableInt16u); + } + + static void OnFailureCallback_51(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_51(chip::to_underlying(status)); + } + + static void OnSuccessCallback_51(void * context) { (static_cast(context))->OnSuccessResponse_51(); } + + static void OnFailureCallback_52(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_52(chip::to_underlying(status)); + } + + static void OnSuccessCallback_52(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + { + (static_cast(context))->OnSuccessResponse_52(nullableInt32u); + } + + static void OnFailureCallback_53(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_53(chip::to_underlying(status)); + } + + static void OnSuccessCallback_53(void * context) { (static_cast(context))->OnSuccessResponse_53(); } + + static void OnFailureCallback_54(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_54(chip::to_underlying(status)); + } + + static void OnSuccessCallback_54(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + { + (static_cast(context))->OnSuccessResponse_54(nullableInt32u); + } + + static void OnFailureCallback_55(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_55(chip::to_underlying(status)); + } + + static void OnSuccessCallback_55(void * context) { (static_cast(context))->OnSuccessResponse_55(); } + + static void OnFailureCallback_56(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_56(chip::to_underlying(status)); + } + + static void OnSuccessCallback_56(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + { + (static_cast(context))->OnSuccessResponse_56(nullableInt32u); + } + + static void OnFailureCallback_57(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_57(chip::to_underlying(status)); + } + + static void OnSuccessCallback_57(void * context) { (static_cast(context))->OnSuccessResponse_57(); } + + static void OnFailureCallback_58(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_58(chip::to_underlying(status)); + } + + static void OnSuccessCallback_58(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + { + (static_cast(context))->OnSuccessResponse_58(nullableInt64u); + } + + static void OnFailureCallback_59(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_59(chip::to_underlying(status)); + } + + static void OnSuccessCallback_59(void * context) { (static_cast(context))->OnSuccessResponse_59(); } + + static void OnFailureCallback_60(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_60(chip::to_underlying(status)); + } + + static void OnSuccessCallback_60(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + { + (static_cast(context))->OnSuccessResponse_60(nullableInt64u); + } + + static void OnFailureCallback_61(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_61(chip::to_underlying(status)); + } + + static void OnSuccessCallback_61(void * context) { (static_cast(context))->OnSuccessResponse_61(); } + + static void OnFailureCallback_62(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_62(chip::to_underlying(status)); + } + + static void OnSuccessCallback_62(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + { + (static_cast(context))->OnSuccessResponse_62(nullableInt64u); + } + + static void OnFailureCallback_63(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_63(chip::to_underlying(status)); + } + + static void OnSuccessCallback_63(void * context) { (static_cast(context))->OnSuccessResponse_63(); } + + static void OnFailureCallback_64(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_64(chip::to_underlying(status)); + } + + static void OnSuccessCallback_64(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + { + (static_cast(context))->OnSuccessResponse_64(nullableInt8s); + } + + static void OnFailureCallback_65(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_65(chip::to_underlying(status)); + } + + static void OnSuccessCallback_65(void * context) { (static_cast(context))->OnSuccessResponse_65(); } + + static void OnFailureCallback_66(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_66(chip::to_underlying(status)); + } + + static void OnSuccessCallback_66(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + { + (static_cast(context))->OnSuccessResponse_66(nullableInt8s); + } + + static void OnFailureCallback_67(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_67(chip::to_underlying(status)); + } + + static void OnSuccessCallback_67(void * context) { (static_cast(context))->OnSuccessResponse_67(); } + + static void OnFailureCallback_68(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_68(chip::to_underlying(status)); + } + + static void OnSuccessCallback_68(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + { + (static_cast(context))->OnSuccessResponse_68(nullableInt8s); + } + + static void OnFailureCallback_69(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_69(chip::to_underlying(status)); + } + + static void OnSuccessCallback_69(void * context) { (static_cast(context))->OnSuccessResponse_69(); } + + static void OnFailureCallback_70(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_70(chip::to_underlying(status)); + } + + static void OnSuccessCallback_70(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + { + (static_cast(context))->OnSuccessResponse_70(nullableInt16s); + } + + static void OnFailureCallback_71(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_71(chip::to_underlying(status)); + } + + static void OnSuccessCallback_71(void * context) { (static_cast(context))->OnSuccessResponse_71(); } + + static void OnFailureCallback_72(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_72(chip::to_underlying(status)); + } + + static void OnSuccessCallback_72(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + { + (static_cast(context))->OnSuccessResponse_72(nullableInt16s); + } + + static void OnFailureCallback_73(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_73(chip::to_underlying(status)); + } + + static void OnSuccessCallback_73(void * context) { (static_cast(context))->OnSuccessResponse_73(); } + + static void OnFailureCallback_74(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_74(chip::to_underlying(status)); + } + + static void OnSuccessCallback_74(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + { + (static_cast(context))->OnSuccessResponse_74(nullableInt16s); + } + + static void OnFailureCallback_75(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_75(chip::to_underlying(status)); + } + + static void OnSuccessCallback_75(void * context) { (static_cast(context))->OnSuccessResponse_75(); } + + static void OnFailureCallback_76(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_76(chip::to_underlying(status)); + } + + static void OnSuccessCallback_76(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + { + (static_cast(context))->OnSuccessResponse_76(nullableInt32s); + } + + static void OnFailureCallback_77(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_77(chip::to_underlying(status)); + } + + static void OnSuccessCallback_77(void * context) { (static_cast(context))->OnSuccessResponse_77(); } + + static void OnFailureCallback_78(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_78(chip::to_underlying(status)); + } + + static void OnSuccessCallback_78(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + { + (static_cast(context))->OnSuccessResponse_78(nullableInt32s); + } + + static void OnFailureCallback_79(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_79(chip::to_underlying(status)); + } + + static void OnSuccessCallback_79(void * context) { (static_cast(context))->OnSuccessResponse_79(); } + + static void OnFailureCallback_80(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_80(chip::to_underlying(status)); + } + + static void OnSuccessCallback_80(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + { + (static_cast(context))->OnSuccessResponse_80(nullableInt32s); + } + + static void OnFailureCallback_81(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_81(chip::to_underlying(status)); + } + + static void OnSuccessCallback_81(void * context) { (static_cast(context))->OnSuccessResponse_81(); } + + static void OnFailureCallback_82(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_82(chip::to_underlying(status)); + } + + static void OnSuccessCallback_82(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + { + (static_cast(context))->OnSuccessResponse_82(nullableInt64s); + } + + static void OnFailureCallback_83(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_83(chip::to_underlying(status)); + } + + static void OnSuccessCallback_83(void * context) { (static_cast(context))->OnSuccessResponse_83(); } + + static void OnFailureCallback_84(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_84(chip::to_underlying(status)); + } + + static void OnSuccessCallback_84(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + { + (static_cast(context))->OnSuccessResponse_84(nullableInt64s); + } + + static void OnFailureCallback_85(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_85(chip::to_underlying(status)); + } + + static void OnSuccessCallback_85(void * context) { (static_cast(context))->OnSuccessResponse_85(); } + + static void OnFailureCallback_86(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_86(chip::to_underlying(status)); + } + + static void OnSuccessCallback_86(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + { + (static_cast(context))->OnSuccessResponse_86(nullableInt64s); + } + + static void OnFailureCallback_87(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_87(chip::to_underlying(status)); + } + + static void OnSuccessCallback_87(void * context) { (static_cast(context))->OnSuccessResponse_87(); } + + static void OnFailureCallback_88(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_88(chip::to_underlying(status)); + } + + static void OnSuccessCallback_88(void * context, const chip::app::DataModel::Nullable & nullableEnum8) + { + (static_cast(context))->OnSuccessResponse_88(nullableEnum8); + } + + static void OnFailureCallback_89(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_89(chip::to_underlying(status)); + } + + 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 & nullableEnum8) + { + (static_cast(context))->OnSuccessResponse_90(nullableEnum8); + } + + 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 & nullableEnum8) + { + (static_cast(context))->OnSuccessResponse_92(nullableEnum8); + } + + 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 & nullableEnum16) + { + (static_cast(context))->OnSuccessResponse_94(nullableEnum16); + } + + 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 & nullableEnum16) + { + (static_cast(context))->OnSuccessResponse_96(nullableEnum16); + } + + 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 & nullableEnum16) + { + (static_cast(context))->OnSuccessResponse_98(nullableEnum16); + } + + static void OnFailureCallback_99(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_99(chip::to_underlying(status)); + } + + static void OnSuccessCallback_99(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + { + (static_cast(context))->OnSuccessResponse_99(nullableOctetString); + } + + static void OnFailureCallback_100(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_100(chip::to_underlying(status)); + } + + static void OnSuccessCallback_100(void * context) + { + (static_cast(context))->OnSuccessResponse_100(); + } + + static void OnFailureCallback_101(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_101(chip::to_underlying(status)); + } + + static void OnSuccessCallback_101(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + { + (static_cast(context))->OnSuccessResponse_101(nullableOctetString); + } + + static void OnFailureCallback_102(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_102(chip::to_underlying(status)); + } + + static void OnSuccessCallback_102(void * context) + { + (static_cast(context))->OnSuccessResponse_102(); + } + + static void OnFailureCallback_103(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_103(chip::to_underlying(status)); + } + + static void OnSuccessCallback_103(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + { + (static_cast(context))->OnSuccessResponse_103(nullableOctetString); + } + + static void OnFailureCallback_104(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_104(chip::to_underlying(status)); + } + + static void OnSuccessCallback_104(void * context) + { + (static_cast(context))->OnSuccessResponse_104(); + } + + 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, const chip::app::DataModel::Nullable & nullableCharString) + { + (static_cast(context))->OnSuccessResponse_106(nullableCharString); + } + + static void OnFailureCallback_107(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_107(chip::to_underlying(status)); + } + + static void OnSuccessCallback_107(void * context) + { + (static_cast(context))->OnSuccessResponse_107(); + } + + 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 & nullableCharString) + { + (static_cast(context))->OnSuccessResponse_109(nullableCharString); + } + + 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_cast(context))->OnFailureResponse_111(chip::to_underlying(status)); + } + + static void OnSuccessCallback_111(void * context, const chip::app::DataModel::Nullable & nullableCharString) + { + (static_cast(context))->OnSuccessResponse_111(nullableCharString); + } + + // + // Tests methods + // + + CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_0() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + using requestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; + using responseType = chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType; + + chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type 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_string"), strlen("octet_string")); + request.arg1.e = chip::Span("char_string", strlen("char_string")); + request.arg1.f = static_cast>(1); + + auto success = [](void * context, const responseType & data) { + (static_cast(context))->OnSuccessResponse_0(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_0(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_0(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_1() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + using requestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; + using responseType = chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType; + + chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type 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_string"), strlen("octet_string")); + request.arg1.e = chip::Span("char_string", strlen("char_string")); + request.arg1.f = static_cast>(1); + + auto success = [](void * context, const responseType & data) { + (static_cast(context))->OnSuccessResponse_1(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_1(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_2() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + using requestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; + using responseType = chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType; + + chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type 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 responseType & data) { + (static_cast(context))->OnSuccessResponse_2(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_2(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_3() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + using requestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; using responseType = chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType; - chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type request; + chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type 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 responseType & data) { + (static_cast(context))->OnSuccessResponse_3(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_3(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_4() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + using requestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + using responseType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType; + + chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type 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 responseType & data) { + (static_cast(context))->OnSuccessResponse_4(data.arg1); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_4(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(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_5() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + using requestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + using responseType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType; + + chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type request; + + request.arg1 = chip::app::DataModel::List(); + + auto success = [](void * context, const responseType & data) { + (static_cast(context))->OnSuccessResponse_5(data.arg1); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_5(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & arg1) + { + auto iter = arg1.begin(); + VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 0)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_6() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + using requestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; + using responseType = chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType; + + chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type 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_string"), strlen("first_octet_string")); + arg1List[0].e = chip::Span("first_char_string", strlen("first_char_string")); + 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_string"), strlen("second_octet_string")); + arg1List[1].e = chip::Span("second_char_string", strlen("second_char_string")); + arg1List[1].f = static_cast>(1); + + request.arg1 = arg1List; + + auto success = [](void * context, const responseType & data) { + (static_cast(context))->OnSuccessResponse_6(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_6(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_6(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_7() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + using requestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; + using responseType = chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType; + + chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type 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_string"), strlen("second_octet_string")); + arg1List[0].e = chip::Span("second_char_string", strlen("second_char_string")); + 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_string"), strlen("first_octet_string")); + arg1List[1].e = chip::Span("first_char_string", strlen("first_char_string")); + arg1List[1].f = static_cast>(1); + + request.arg1 = arg1List; + + auto success = [](void * context, const responseType & data) { + (static_cast(context))->OnSuccessResponse_7(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_7(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_7(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithOptionalArgSet_8() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + using requestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; + using responseType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType; + + chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type request; + request.arg1.Emplace().SetNonNull() = 5; + + auto success = [](void * context, const responseType & data) { + (static_cast(context)) + ->OnSuccessResponse_8(data.wasPresent, data.wasNull, data.value, data.originalValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_8(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_8(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_9() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + using requestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; + using responseType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType; + + chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type request; + + auto success = [](void * context, const responseType & data) { + (static_cast(context)) + ->OnSuccessResponse_9(data.wasPresent, data.wasNull, data.value, data.originalValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_9(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_9(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + const chip::Optional> & originalValue) + { + VerifyOrReturn(CheckValue("wasPresent", wasPresent, false)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithOptionalArgSetToNull_10() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + using requestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; + using responseType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType; + + chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type request; + request.arg1.Emplace().SetNull(); + + auto success = [](void * context, const responseType & data) { + (static_cast(context)) + ->OnSuccessResponse_10(data.wasPresent, data.wasNull, data.value, data.originalValue); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_10(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_10(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_11() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBooleanArgument; + nullableBooleanArgument.SetNull(); + + return cluster.WriteAttribute( + nullableBooleanArgument, this, OnSuccessCallback_11, OnFailureCallback_11); + } + + void OnFailureResponse_11(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_11() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBooleanNull_12() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12); + } + + void OnFailureResponse_12(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_12(const chip::app::DataModel::Nullable & nullableBoolean) + { + VerifyOrReturn(CheckValueNull("nullableBoolean", nullableBoolean)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBooleanTrue_13() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBooleanArgument; + nullableBooleanArgument.SetNonNull() = true; + + return cluster.WriteAttribute( + nullableBooleanArgument, this, OnSuccessCallback_13, OnFailureCallback_13); + } + + void OnFailureResponse_13(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_13() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBooleanTrue_14() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_14, OnFailureCallback_14); + } + + void OnFailureResponse_14(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_14(const chip::app::DataModel::Nullable & nullableBoolean) + { + VerifyOrReturn(CheckValueNonNull("nullableBoolean", nullableBoolean)); + VerifyOrReturn(CheckValue("nullableBoolean.Value()", nullableBoolean.Value(), true)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_15() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap8Argument; + nullableBitmap8Argument.SetNonNull() = 254; + + return cluster.WriteAttribute( + nullableBitmap8Argument, this, OnSuccessCallback_15, OnFailureCallback_15); + } + + void OnFailureResponse_15(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_15() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_16() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_16, OnFailureCallback_16); + } + + void OnFailureResponse_16(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_16(const chip::app::DataModel::Nullable & nullableBitmap8) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); + VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_17() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap8Argument; + nullableBitmap8Argument.SetNonNull() = 255; + + return cluster.WriteAttribute( + nullableBitmap8Argument, this, OnSuccessCallback_17, OnFailureCallback_17); + } + + void OnFailureResponse_17(uint8_t status) { NextTest(); } + + void OnSuccessResponse_17() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_18() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_18, OnFailureCallback_18); + } + + void OnFailureResponse_18(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_18(const chip::app::DataModel::Nullable & nullableBitmap8) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); + VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_19() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap8Argument; + nullableBitmap8Argument.SetNull(); + + return cluster.WriteAttribute( + nullableBitmap8Argument, this, OnSuccessCallback_19, OnFailureCallback_19); + } + + void OnFailureResponse_19(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_19() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_20() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_20, OnFailureCallback_20); + } + + void OnFailureResponse_20(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_20(const chip::app::DataModel::Nullable & nullableBitmap8) + { + VerifyOrReturn(CheckValueNull("nullableBitmap8", nullableBitmap8)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_21() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap16Argument; + nullableBitmap16Argument.SetNonNull() = 65534U; + + return cluster.WriteAttribute( + nullableBitmap16Argument, this, OnSuccessCallback_21, OnFailureCallback_21); + } + + void OnFailureResponse_21(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_21() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_22() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_22, OnFailureCallback_22); + } + + void OnFailureResponse_22(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_22(const chip::app::DataModel::Nullable & nullableBitmap16) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); + VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_23() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap16Argument; + nullableBitmap16Argument.SetNonNull() = 65535U; + + return cluster.WriteAttribute( + nullableBitmap16Argument, this, OnSuccessCallback_23, OnFailureCallback_23); + } + + void OnFailureResponse_23(uint8_t status) { NextTest(); } + + void OnSuccessResponse_23() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_24() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_24, OnFailureCallback_24); + } + + void OnFailureResponse_24(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_24(const chip::app::DataModel::Nullable & nullableBitmap16) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); + VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_25() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap16Argument; + nullableBitmap16Argument.SetNull(); + + return cluster.WriteAttribute( + nullableBitmap16Argument, this, OnSuccessCallback_25, OnFailureCallback_25); + } + + void OnFailureResponse_25(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_25() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_26() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_26, OnFailureCallback_26); + } + + void OnFailureResponse_26(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_26(const chip::app::DataModel::Nullable & nullableBitmap16) + { + VerifyOrReturn(CheckValueNull("nullableBitmap16", nullableBitmap16)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_27() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap32Argument; + nullableBitmap32Argument.SetNonNull() = 4294967294UL; + + return cluster.WriteAttribute( + nullableBitmap32Argument, this, OnSuccessCallback_27, OnFailureCallback_27); + } + + void OnFailureResponse_27(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_27() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_28() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_28, OnFailureCallback_28); + } + + void OnFailureResponse_28(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_28(const chip::app::DataModel::Nullable & nullableBitmap32) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); + VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_29() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap32Argument; + nullableBitmap32Argument.SetNonNull() = 4294967295UL; + + return cluster.WriteAttribute( + nullableBitmap32Argument, this, OnSuccessCallback_29, OnFailureCallback_29); + } + + void OnFailureResponse_29(uint8_t status) { NextTest(); } + + void OnSuccessResponse_29() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_30() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_30, OnFailureCallback_30); + } + + void OnFailureResponse_30(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_30(const chip::app::DataModel::Nullable & nullableBitmap32) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); + VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_31() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap32Argument; + nullableBitmap32Argument.SetNull(); + + return cluster.WriteAttribute( + nullableBitmap32Argument, this, OnSuccessCallback_31, OnFailureCallback_31); + } + + void OnFailureResponse_31(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_31() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_32() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_32, OnFailureCallback_32); + } + + void OnFailureResponse_32(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_32(const chip::app::DataModel::Nullable & nullableBitmap32) + { + VerifyOrReturn(CheckValueNull("nullableBitmap32", nullableBitmap32)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_33() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap64Argument; + nullableBitmap64Argument.SetNonNull() = 18446744073709551614ULL; + + return cluster.WriteAttribute( + nullableBitmap64Argument, this, OnSuccessCallback_33, OnFailureCallback_33); + } + + void OnFailureResponse_33(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_33() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_34() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_34, OnFailureCallback_34); + } + + void OnFailureResponse_34(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_34(const chip::app::DataModel::Nullable & nullableBitmap64) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); + VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_35() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap64Argument; + nullableBitmap64Argument.SetNonNull() = 18446744073709551615ULL; + + return cluster.WriteAttribute( + nullableBitmap64Argument, this, OnSuccessCallback_35, OnFailureCallback_35); + } + + void OnFailureResponse_35(uint8_t status) { NextTest(); } + + void OnSuccessResponse_35() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_36() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_36, OnFailureCallback_36); + } + + void OnFailureResponse_36(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_36(const chip::app::DataModel::Nullable & nullableBitmap64) + { + VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); + VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_37() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableBitmap64Argument; + nullableBitmap64Argument.SetNull(); + + return cluster.WriteAttribute( + nullableBitmap64Argument, this, OnSuccessCallback_37, OnFailureCallback_37); + } + + void OnFailureResponse_37(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_37() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_38() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_38, OnFailureCallback_38); + } + + void OnFailureResponse_38(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_38(const chip::app::DataModel::Nullable & nullableBitmap64) + { + VerifyOrReturn(CheckValueNull("nullableBitmap64", nullableBitmap64)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_39() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt8uArgument; + nullableInt8uArgument.SetNonNull() = 254; + + return cluster.WriteAttribute( + nullableInt8uArgument, this, OnSuccessCallback_39, OnFailureCallback_39); + } + + void OnFailureResponse_39(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_39() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_40() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_40, OnFailureCallback_40); + } + + void OnFailureResponse_40(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_40(const chip::app::DataModel::Nullable & nullableInt8u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); + VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_41() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt8uArgument; + nullableInt8uArgument.SetNonNull() = 255; + + return cluster.WriteAttribute( + nullableInt8uArgument, this, OnSuccessCallback_41, OnFailureCallback_41); + } + + void OnFailureResponse_41(uint8_t status) { NextTest(); } + + void OnSuccessResponse_41() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_42() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_42, OnFailureCallback_42); + } + + void OnFailureResponse_42(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_42(const chip::app::DataModel::Nullable & nullableInt8u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); + VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_43() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt8uArgument; + nullableInt8uArgument.SetNull(); + + return cluster.WriteAttribute( + nullableInt8uArgument, this, OnSuccessCallback_43, OnFailureCallback_43); + } + + void OnFailureResponse_43(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_43() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt8uNullValue_44() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_44, OnFailureCallback_44); + } + + void OnFailureResponse_44(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_44(const chip::app::DataModel::Nullable & nullableInt8u) + { + VerifyOrReturn(CheckValueNull("nullableInt8u", nullableInt8u)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_45() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt16uArgument; + nullableInt16uArgument.SetNonNull() = 65534U; + + return cluster.WriteAttribute( + nullableInt16uArgument, this, OnSuccessCallback_45, OnFailureCallback_45); + } + + void OnFailureResponse_45(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_45() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_46() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_46, OnFailureCallback_46); + } + + void OnFailureResponse_46(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_46(const chip::app::DataModel::Nullable & nullableInt16u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); + VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_47() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt16uArgument; + nullableInt16uArgument.SetNonNull() = 65535U; + + return cluster.WriteAttribute( + nullableInt16uArgument, this, OnSuccessCallback_47, OnFailureCallback_47); + } + + void OnFailureResponse_47(uint8_t status) { NextTest(); } + + void OnSuccessResponse_47() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_48() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_48, OnFailureCallback_48); + } + + void OnFailureResponse_48(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_48(const chip::app::DataModel::Nullable & nullableInt16u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); + VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_49() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt16uArgument; + nullableInt16uArgument.SetNull(); + + return cluster.WriteAttribute( + nullableInt16uArgument, this, OnSuccessCallback_49, OnFailureCallback_49); + } + + void OnFailureResponse_49(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_49() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt16uNullValue_50() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_50, OnFailureCallback_50); + } + + void OnFailureResponse_50(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_50(const chip::app::DataModel::Nullable & nullableInt16u) + { + VerifyOrReturn(CheckValueNull("nullableInt16u", nullableInt16u)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_51() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt32uArgument; + nullableInt32uArgument.SetNonNull() = 4294967294UL; + + return cluster.WriteAttribute( + nullableInt32uArgument, this, OnSuccessCallback_51, OnFailureCallback_51); + } + + void OnFailureResponse_51(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_51() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_52() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_52, OnFailureCallback_52); + } + + void OnFailureResponse_52(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_52(const chip::app::DataModel::Nullable & nullableInt32u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); + VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_53() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt32uArgument; + nullableInt32uArgument.SetNonNull() = 4294967295UL; + + return cluster.WriteAttribute( + nullableInt32uArgument, this, OnSuccessCallback_53, OnFailureCallback_53); + } + + void OnFailureResponse_53(uint8_t status) { NextTest(); } + + void OnSuccessResponse_53() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_54() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_54, OnFailureCallback_54); + } + + void OnFailureResponse_54(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_54(const chip::app::DataModel::Nullable & nullableInt32u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); + VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_55() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt32uArgument; + nullableInt32uArgument.SetNull(); + + return cluster.WriteAttribute( + nullableInt32uArgument, this, OnSuccessCallback_55, OnFailureCallback_55); + } + + void OnFailureResponse_55(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_55() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt32uNullValue_56() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_56, OnFailureCallback_56); + } + + void OnFailureResponse_56(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_56(const chip::app::DataModel::Nullable & nullableInt32u) + { + VerifyOrReturn(CheckValueNull("nullableInt32u", nullableInt32u)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_57() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt64uArgument; + nullableInt64uArgument.SetNonNull() = 18446744073709551614ULL; + + return cluster.WriteAttribute( + nullableInt64uArgument, this, OnSuccessCallback_57, OnFailureCallback_57); + } + + void OnFailureResponse_57(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_57() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_58() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_58, OnFailureCallback_58); + } + + void OnFailureResponse_58(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_58(const chip::app::DataModel::Nullable & nullableInt64u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); + VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_59() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt64uArgument; + nullableInt64uArgument.SetNonNull() = 18446744073709551615ULL; + + return cluster.WriteAttribute( + nullableInt64uArgument, this, OnSuccessCallback_59, OnFailureCallback_59); + } + + void OnFailureResponse_59(uint8_t status) { NextTest(); } + + void OnSuccessResponse_59() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_60() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_60, OnFailureCallback_60); + } + + void OnFailureResponse_60(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_60(const chip::app::DataModel::Nullable & nullableInt64u) + { + VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); + VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_61() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt64uArgument; + nullableInt64uArgument.SetNull(); + + return cluster.WriteAttribute( + nullableInt64uArgument, this, OnSuccessCallback_61, OnFailureCallback_61); + } + + void OnFailureResponse_61(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_61() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt64uNullValue_62() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_62, OnFailureCallback_62); + } + + void OnFailureResponse_62(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_62(const chip::app::DataModel::Nullable & nullableInt64u) + { + VerifyOrReturn(CheckValueNull("nullableInt64u", nullableInt64u)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_63() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt8sArgument; + nullableInt8sArgument.SetNonNull() = -127; + + return cluster.WriteAttribute( + nullableInt8sArgument, this, OnSuccessCallback_63, OnFailureCallback_63); + } + + void OnFailureResponse_63(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_63() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt8sMinValue_64() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_64, OnFailureCallback_64); + } + + void OnFailureResponse_64(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_64(const chip::app::DataModel::Nullable & nullableInt8s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); + VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_65() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt8sArgument; + nullableInt8sArgument.SetNonNull() = -128; + + return cluster.WriteAttribute( + nullableInt8sArgument, this, OnSuccessCallback_65, OnFailureCallback_65); + } + + void OnFailureResponse_65(uint8_t status) { NextTest(); } + + void OnSuccessResponse_65() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_66() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_66, OnFailureCallback_66); + } + + void OnFailureResponse_66(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_66(const chip::app::DataModel::Nullable & nullableInt8s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); + VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_67() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt8sArgument; + nullableInt8sArgument.SetNull(); + + return cluster.WriteAttribute( + nullableInt8sArgument, this, OnSuccessCallback_67, OnFailureCallback_67); + } + + void OnFailureResponse_67(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_67() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt8sNullValue_68() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_68, OnFailureCallback_68); + } + + void OnFailureResponse_68(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_68(const chip::app::DataModel::Nullable & nullableInt8s) + { + VerifyOrReturn(CheckValueNull("nullableInt8s", nullableInt8s)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_69() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt16sArgument; + nullableInt16sArgument.SetNonNull() = -32767; + + return cluster.WriteAttribute( + nullableInt16sArgument, this, OnSuccessCallback_69, OnFailureCallback_69); + } + + void OnFailureResponse_69(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_69() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt16sMinValue_70() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_70, OnFailureCallback_70); + } + + void OnFailureResponse_70(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_70(const chip::app::DataModel::Nullable & nullableInt16s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); + VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_71() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt16sArgument; + nullableInt16sArgument.SetNonNull() = -32768; + + return cluster.WriteAttribute( + nullableInt16sArgument, this, OnSuccessCallback_71, OnFailureCallback_71); + } + + void OnFailureResponse_71(uint8_t status) { NextTest(); } + + void OnSuccessResponse_71() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_72() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_72, OnFailureCallback_72); + } + + void OnFailureResponse_72(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_72(const chip::app::DataModel::Nullable & nullableInt16s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); + VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_73() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt16sArgument; + nullableInt16sArgument.SetNull(); + + return cluster.WriteAttribute( + nullableInt16sArgument, this, OnSuccessCallback_73, OnFailureCallback_73); + } + + void OnFailureResponse_73(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_73() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt16sNullValue_74() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_74, OnFailureCallback_74); + } + + void OnFailureResponse_74(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_74(const chip::app::DataModel::Nullable & nullableInt16s) + { + VerifyOrReturn(CheckValueNull("nullableInt16s", nullableInt16s)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_75() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt32sArgument; + nullableInt32sArgument.SetNonNull() = -2147483647L; - 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; + return cluster.WriteAttribute( + nullableInt32sArgument, this, OnSuccessCallback_75, OnFailureCallback_75); + } - auto success = [](void * context, const responseType & data) { - (static_cast(context))->OnSuccessResponse_3(data.value); - }; + void OnFailureResponse_75(uint8_t status) { ThrowFailureResponse(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_3(status); - }; - return cluster.InvokeCommand(request, this, success, failure); + void OnSuccessResponse_75() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt32sMinValue_76() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_76, OnFailureCallback_76); } - void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_76(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_3(bool value) + void OnSuccessResponse_76(const chip::app::DataModel::Nullable & nullableInt32s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); + VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_77() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt32sArgument; + nullableInt32sArgument.SetNonNull() = -2147483648L; + + return cluster.WriteAttribute( + nullableInt32sArgument, this, OnSuccessCallback_77, OnFailureCallback_77); + } + + void OnFailureResponse_77(uint8_t status) { NextTest(); } + + void OnSuccessResponse_77() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_78() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_78, OnFailureCallback_78); + } + + void OnFailureResponse_78(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_78(const chip::app::DataModel::Nullable & nullableInt32s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); + VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_79() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt32sArgument; + nullableInt32sArgument.SetNull(); + + return cluster.WriteAttribute( + nullableInt32sArgument, this, OnSuccessCallback_79, OnFailureCallback_79); + } + + void OnFailureResponse_79(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_79() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt32sNullValue_80() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_80, OnFailureCallback_80); + } + + void OnFailureResponse_80(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_80(const chip::app::DataModel::Nullable & nullableInt32s) + { + VerifyOrReturn(CheckValueNull("nullableInt32s", nullableInt32s)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_81() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt64sArgument; + nullableInt64sArgument.SetNonNull() = -9223372036854775807LL; + + return cluster.WriteAttribute( + nullableInt64sArgument, this, OnSuccessCallback_81, OnFailureCallback_81); + } + + void OnFailureResponse_81(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_81() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt64sMinValue_82() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_82, OnFailureCallback_82); + } + + void OnFailureResponse_82(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_82(const chip::app::DataModel::Nullable & nullableInt64s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); + VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_83() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt64sArgument; + nullableInt64sArgument.SetNonNull() = -9223372036854775807LL - 1LL; + + return cluster.WriteAttribute( + nullableInt64sArgument, this, OnSuccessCallback_83, OnFailureCallback_83); + } + + void OnFailureResponse_83(uint8_t status) { NextTest(); } + + void OnSuccessResponse_83() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_84() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_84, OnFailureCallback_84); + } + + void OnFailureResponse_84(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_84(const chip::app::DataModel::Nullable & nullableInt64s) + { + VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); + VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_85() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableInt64sArgument; + nullableInt64sArgument.SetNull(); + + return cluster.WriteAttribute( + nullableInt64sArgument, this, OnSuccessCallback_85, OnFailureCallback_85); + } + + void OnFailureResponse_85(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_85() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableInt64sNullValue_86() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_86, OnFailureCallback_86); + } + + void OnFailureResponse_86(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_86(const chip::app::DataModel::Nullable & nullableInt64s) + { + VerifyOrReturn(CheckValueNull("nullableInt64s", nullableInt64s)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_87() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableEnum8Argument; + nullableEnum8Argument.SetNonNull() = static_cast(254); + + return cluster.WriteAttribute( + nullableEnum8Argument, this, OnSuccessCallback_87, OnFailureCallback_87); + } + + void OnFailureResponse_87(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_87() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_88() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_88, OnFailureCallback_88); + } + + void OnFailureResponse_88(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_88(const chip::app::DataModel::Nullable & nullableEnum8) + { + VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); + VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_89() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableEnum8Argument; + nullableEnum8Argument.SetNonNull() = static_cast(255); + + return cluster.WriteAttribute( + nullableEnum8Argument, this, OnSuccessCallback_89, OnFailureCallback_89); + } + + void OnFailureResponse_89(uint8_t status) { NextTest(); } + + void OnSuccessResponse_89() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_90() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_90, OnFailureCallback_90); + } + + void OnFailureResponse_90(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_90(const chip::app::DataModel::Nullable & nullableEnum8) + { + VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); + VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_91() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableEnum8Argument; + nullableEnum8Argument.SetNull(); + + return cluster.WriteAttribute( + nullableEnum8Argument, this, OnSuccessCallback_91, OnFailureCallback_91); + } + + void OnFailureResponse_91(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_91() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableEnum8NullValue_92() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_92, OnFailureCallback_92); + } + + void OnFailureResponse_92(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_92(const chip::app::DataModel::Nullable & nullableEnum8) + { + VerifyOrReturn(CheckValueNull("nullableEnum8", nullableEnum8)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_93() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableEnum16Argument; + nullableEnum16Argument.SetNonNull() = static_cast(65534); + + return cluster.WriteAttribute( + nullableEnum16Argument, this, OnSuccessCallback_93, OnFailureCallback_93); + } + + void OnFailureResponse_93(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_93() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_94() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_94, OnFailureCallback_94); + } + + void OnFailureResponse_94(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_94(const chip::app::DataModel::Nullable & nullableEnum16) + { + VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); + VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); + NextTest(); + } + + CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_95() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableEnum16Argument; + nullableEnum16Argument.SetNonNull() = static_cast(65535); + + return cluster.WriteAttribute( + nullableEnum16Argument, this, OnSuccessCallback_95, OnFailureCallback_95); + } + + void OnFailureResponse_95(uint8_t status) { NextTest(); } + + void OnSuccessResponse_95() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_96() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_96, OnFailureCallback_96); + } + + void OnFailureResponse_96(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_96(const chip::app::DataModel::Nullable & nullableEnum16) { - VerifyOrReturn(CheckValue("value", value, false)); + VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); + VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_4() + CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_97() { chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); - using requestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; - using responseType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType; + chip::app::DataModel::Nullable nullableEnum16Argument; + nullableEnum16Argument.SetNull(); - chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type request; + return cluster.WriteAttribute( + nullableEnum16Argument, this, OnSuccessCallback_97, OnFailureCallback_97); + } - 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; + void OnFailureResponse_97(uint8_t status) { ThrowFailureResponse(); } - auto success = [](void * context, const responseType & data) { - (static_cast(context))->OnSuccessResponse_4(data.arg1); - }; + void OnSuccessResponse_97() { NextTest(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_4(status); - }; - return cluster.InvokeCommand(request, this, success, failure); + CHIP_ERROR TestReadAttributeNullableEnum16NullValue_98() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_98, OnFailureCallback_98); } - void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_98(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & arg1) + void OnSuccessResponse_98(const chip::app::DataModel::Nullable & nullableEnum16) { - auto iter = arg1.begin(); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 0)); - VerifyOrReturn(CheckValue("arg1[0]", iter.GetValue(), 9)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 1)); - VerifyOrReturn(CheckValue("arg1[1]", iter.GetValue(), 8)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 2)); - VerifyOrReturn(CheckValue("arg1[2]", iter.GetValue(), 7)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 3)); - VerifyOrReturn(CheckValue("arg1[3]", iter.GetValue(), 6)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 4)); - VerifyOrReturn(CheckValue("arg1[4]", iter.GetValue(), 5)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 5)); - VerifyOrReturn(CheckValue("arg1[5]", iter.GetValue(), 4)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 6)); - VerifyOrReturn(CheckValue("arg1[6]", iter.GetValue(), 3)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 7)); - VerifyOrReturn(CheckValue("arg1[7]", iter.GetValue(), 2)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 8)); - VerifyOrReturn(CheckValue("arg1[8]", iter.GetValue(), 1)); - VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 9)); + VerifyOrReturn(CheckValueNull("nullableEnum16", nullableEnum16)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_5() + CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_99() { chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); - using requestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; - using responseType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType; - - chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type request; - - request.arg1 = chip::app::DataModel::List(); - - auto success = [](void * context, const responseType & data) { - (static_cast(context))->OnSuccessResponse_5(data.arg1); - }; - - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_5(status); - }; - return cluster.InvokeCommand(request, this, success, failure); + return cluster.ReadAttribute( + this, OnSuccessCallback_99, OnFailureCallback_99); } - void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_99(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & arg1) + void OnSuccessResponse_99(const chip::app::DataModel::Nullable & nullableOctetString) { - auto iter = arg1.begin(); - VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 0)); + VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); + VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), "")); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_6() + CHIP_ERROR TestWriteAttributeNullableOctetString_100() { chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); - using requestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; - using responseType = chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType; - - chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type request; - - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List[2]; + chip::app::DataModel::Nullable nullableOctetStringArgument; + nullableOctetStringArgument.SetNonNull() = chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), strlen("TestValue")); - 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_string"), strlen("first_octet_string")); - arg1List[0].e = chip::Span("first_char_string", strlen("first_char_string")); - arg1List[0].f = static_cast>(1); + return cluster.WriteAttribute( + nullableOctetStringArgument, this, OnSuccessCallback_100, OnFailureCallback_100); + } - 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_string"), strlen("second_octet_string")); - arg1List[1].e = chip::Span("second_char_string", strlen("second_char_string")); - arg1List[1].f = static_cast>(1); + void OnFailureResponse_100(uint8_t status) { ThrowFailureResponse(); } - request.arg1 = arg1List; + void OnSuccessResponse_100() { NextTest(); } - auto success = [](void * context, const responseType & data) { - (static_cast(context))->OnSuccessResponse_6(data.value); - }; + CHIP_ERROR TestReadAttributeNullableOctetString_101() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_6(status); - }; - return cluster.InvokeCommand(request, this, success, failure); + return cluster.ReadAttribute( + this, OnSuccessCallback_101, OnFailureCallback_101); } - void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_101(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_6(bool value) + void OnSuccessResponse_101(const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValue("value", value, true)); + VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); + VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), "TestValue")); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_7() + CHIP_ERROR TestWriteAttributeNullableOctetString_102() { chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); - using requestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; - using responseType = chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType; - - chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type request; - - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List[2]; + chip::app::DataModel::Nullable nullableOctetStringArgument; + nullableOctetStringArgument.SetNull(); - 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_string"), strlen("second_octet_string")); - arg1List[0].e = chip::Span("second_char_string", strlen("second_char_string")); - arg1List[0].f = static_cast>(1); + return cluster.WriteAttribute( + nullableOctetStringArgument, this, OnSuccessCallback_102, OnFailureCallback_102); + } - 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_string"), strlen("first_octet_string")); - arg1List[1].e = chip::Span("first_char_string", strlen("first_char_string")); - arg1List[1].f = static_cast>(1); + void OnFailureResponse_102(uint8_t status) { ThrowFailureResponse(); } - request.arg1 = arg1List; + void OnSuccessResponse_102() { NextTest(); } - auto success = [](void * context, const responseType & data) { - (static_cast(context))->OnSuccessResponse_7(data.value); - }; + CHIP_ERROR TestReadAttributeNullableOctetString_103() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_7(status); - }; - return cluster.InvokeCommand(request, this, success, failure); + return cluster.ReadAttribute( + this, OnSuccessCallback_103, OnFailureCallback_103); } - void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_103(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_7(bool value) + void OnSuccessResponse_103(const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValue("value", value, false)); + VerifyOrReturn(CheckValueNull("nullableOctetString", nullableOctetString)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithOptionalArgSet_8() + CHIP_ERROR TestWriteAttributeNullableOctetString_104() { chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); - using requestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; - using responseType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType; + chip::app::DataModel::Nullable nullableOctetStringArgument; + nullableOctetStringArgument.SetNonNull() = chip::ByteSpan(chip::Uint8::from_const_char(""), strlen("")); - chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type request; - request.arg1.Emplace().SetNonNull() = 5; + return cluster.WriteAttribute( + nullableOctetStringArgument, this, OnSuccessCallback_104, OnFailureCallback_104); + } - auto success = [](void * context, const responseType & data) { - (static_cast(context)) - ->OnSuccessResponse_8(data.wasPresent, data.wasNull, data.value, data.originalValue); - }; + void OnFailureResponse_104(uint8_t status) { ThrowFailureResponse(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_8(status); - }; - return cluster.InvokeCommand(request, this, success, failure); + void OnSuccessResponse_104() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableOctetString_105() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_105, OnFailureCallback_105); } - void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_105(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_8(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, - const chip::Optional> & originalValue) + void OnSuccessResponse_105(const chip::app::DataModel::Nullable & nullableOctetString) { - VerifyOrReturn(CheckValue("wasPresent", wasPresent, true)); + VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); + VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), "")); + NextTest(); + } - VerifyOrReturn(CheckValuePresent("wasNull", wasNull)); - VerifyOrReturn(CheckValue("wasNull.Value()", wasNull.Value(), false)); + CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_106() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); - VerifyOrReturn(CheckValuePresent("value", value)); - VerifyOrReturn(CheckValue("value.Value()", value.Value(), 5)); + return cluster.ReadAttribute( + this, OnSuccessCallback_106, OnFailureCallback_106); + } - VerifyOrReturn(CheckValuePresent("originalValue", originalValue)); - VerifyOrReturn(CheckValueNonNull("originalValue.Value()", originalValue.Value())); - VerifyOrReturn(CheckValue("originalValue.Value().Value()", originalValue.Value().Value(), 5)); + void OnFailureResponse_106(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_106(const chip::app::DataModel::Nullable & nullableCharString) + { + VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); + VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), "")); NextTest(); } - CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_9() + CHIP_ERROR TestWriteAttributeNullableCharString_107() { chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); - using requestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; - using responseType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType; + chip::app::DataModel::Nullable nullableCharStringArgument; + nullableCharStringArgument.SetNonNull() = chip::Span("☉T☉", strlen("☉T☉")); - chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type request; + return cluster.WriteAttribute( + nullableCharStringArgument, this, OnSuccessCallback_107, OnFailureCallback_107); + } - auto success = [](void * context, const responseType & data) { - (static_cast(context)) - ->OnSuccessResponse_9(data.wasPresent, data.wasNull, data.value, data.originalValue); - }; + void OnFailureResponse_107(uint8_t status) { ThrowFailureResponse(); } - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_9(status); - }; - return cluster.InvokeCommand(request, this, success, failure); + void OnSuccessResponse_107() { NextTest(); } + + CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_108() + { + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + chip::app::DataModel::Nullable nullableCharStringArgument; + nullableCharStringArgument.SetNull(); + + return cluster.WriteAttribute( + nullableCharStringArgument, this, OnSuccessCallback_108, OnFailureCallback_108); } - void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_108(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_9(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, - const chip::Optional> & originalValue) + void OnSuccessResponse_108() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableCharString_109() { - VerifyOrReturn(CheckValue("wasPresent", wasPresent, false)); + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttribute( + this, OnSuccessCallback_109, OnFailureCallback_109); + } + void OnFailureResponse_109(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_109(const chip::app::DataModel::Nullable & nullableCharString) + { + VerifyOrReturn(CheckValueNull("nullableCharString", nullableCharString)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithOptionalArgSetToNull_10() + CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_110() { chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, 1); - using requestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; - using responseType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType; - - chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type request; - request.arg1.Emplace().SetNull(); - - auto success = [](void * context, const responseType & data) { - (static_cast(context)) - ->OnSuccessResponse_10(data.wasPresent, data.wasNull, data.value, data.originalValue); - }; + chip::app::DataModel::Nullable nullableCharStringArgument; + nullableCharStringArgument.SetNonNull() = chip::Span("", strlen("")); - auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_10(status); - }; - return cluster.InvokeCommand(request, this, success, failure); + return cluster.WriteAttribute( + nullableCharStringArgument, this, OnSuccessCallback_110, OnFailureCallback_110); } - void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_110(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_10(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, - const chip::Optional> & originalValue) + void OnSuccessResponse_110() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableCharString_111() { - VerifyOrReturn(CheckValue("wasPresent", wasPresent, true)); + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, 1); - VerifyOrReturn(CheckValuePresent("wasNull", wasNull)); - VerifyOrReturn(CheckValue("wasNull.Value()", wasNull.Value(), true)); + return cluster.ReadAttribute( + this, OnSuccessCallback_111, OnFailureCallback_111); + } - VerifyOrReturn(CheckValuePresent("originalValue", originalValue)); - VerifyOrReturn(CheckValueNull("originalValue.Value()", originalValue.Value())); + void OnFailureResponse_111(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_111(const chip::app::DataModel::Nullable & nullableCharString) + { + VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); + VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), "")); NextTest(); } }; diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 6c671bc1fc8f27..9a15197b9ee204 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -11926,6 +11926,380 @@ CHIP_ERROR TestClusterCluster::WriteAttributeUnsupported(Callback::Cancelable * return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); } +CHIP_ERROR TestClusterCluster::ReadAttributeNullableBoolean(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008000; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableBoolean(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableBoolean::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableBitmap8(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008001; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableBitmap8(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableBitmap8::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableBitmap16(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008002; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableBitmap16(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableBitmap16::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableBitmap32(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008003; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableBitmap32(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableBitmap32::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableBitmap64(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008004; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableBitmap64(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableBitmap64::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableInt8u(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008005; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableInt8u(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableInt8u::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableInt16u(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008006; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableInt16u(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableInt16u::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableInt32u(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008008; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableInt32u(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableInt32u::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableInt64u(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000800C; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableInt64u(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableInt64u::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableInt8s(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000800D; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableInt8s(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableInt8s::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableInt16s(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000800E; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableInt16s(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableInt16s::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableInt32s(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008010; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableInt32s(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableInt32s::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableInt64s(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008014; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableInt64s(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableInt64s::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableEnum8(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008015; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableEnum8(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableEnum8::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableEnum16(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008016; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableEnum16(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableEnum16::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableOctetString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00008019; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableOctetString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableOctetString::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterCluster::ReadAttributeNullableCharString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000801E; + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR TestClusterCluster::WriteAttributeNullableCharString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::NullableCharString::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + CHIP_ERROR TestClusterCluster::ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index 72c6c5bf00a1cd..b38723f8612194 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -1413,6 +1413,23 @@ class DLL_EXPORT TestClusterCluster : public ClusterBase CHIP_ERROR ReadAttributeListNullablesAndOptionalsStruct(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR ReadAttributeUnsupported(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableBoolean(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableBitmap8(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableBitmap16(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableBitmap32(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableBitmap64(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableInt8u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableInt16u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableInt32u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableInt64u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableInt8s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableInt16s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableInt32s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableInt64s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableEnum8(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableEnum16(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableOctetString(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeNullableCharString(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR WriteAttributeBoolean(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, bool value); @@ -1460,6 +1477,40 @@ class DLL_EXPORT TestClusterCluster : public ClusterBase chip::VendorId value); CHIP_ERROR WriteAttributeUnsupported(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, bool value); + CHIP_ERROR WriteAttributeNullableBoolean(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + bool value); + CHIP_ERROR WriteAttributeNullableBitmap8(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeNullableBitmap16(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeNullableBitmap32(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeNullableBitmap64(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint64_t value); + CHIP_ERROR WriteAttributeNullableInt8u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeNullableInt16u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeNullableInt32u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); + CHIP_ERROR WriteAttributeNullableInt64u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint64_t value); + CHIP_ERROR WriteAttributeNullableInt8s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int8_t value); + CHIP_ERROR WriteAttributeNullableInt16s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int16_t value); + CHIP_ERROR WriteAttributeNullableInt32s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int32_t value); + CHIP_ERROR WriteAttributeNullableInt64s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + int64_t value); + CHIP_ERROR WriteAttributeNullableEnum8(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeNullableEnum16(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeNullableOctetString(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); + CHIP_ERROR WriteAttributeNullableCharString(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::CharSpan value); private: };